8

I am new to ROS, I just opened a terminal and typed roscore and another terminal and typed rostopic node and I got this error that says

Failed to load Python extension for LZ4 support. LZ4 compression will not be available.

I searched and went to https://pypi.org/project/lz4/#files and installed lz4 using pip install lz4 and after installation the same error exists, what should I do?

I installed ros on ubuntu 16.04 sudo apt-get install ros-kinetic-desktop-full

Expected output: /rosout /rosout_agg

Actual Output: Failed to load Python extension for LZ4 support. LZ4 compression will not be available. /rosout /rosout_agg

Abdelrahman Emam
  • 385
  • 1
  • 6
  • 15

3 Answers3

3

You can get the required roslz4 package (and rosbag itself, too) from the separate ROS PyPI:

pip install roslz4 --extra-index-url https://rospypi.github.io/simple/
Martin Valgur
  • 5,793
  • 1
  • 33
  • 45
2

On macOS you could use Homebrew to install the lz4 library, and then use Martin Valgur's solution to install the roslz4 Python package, but you will need some extra environment variables:

CFLAGS="-I$(brew --prefix lz4)/include" \
LDFLAGS="-L$(brew --prefix lz4)/lib" \
pip install roslz4 --extra-index-url https://rospypi.github.io/simple/
rgov
  • 3,516
  • 1
  • 31
  • 51
-2

This worked for me

 pip install lz4 #for python2
 pip3 install lz4 #for python3
user3151256
  • 163
  • 1
  • 9