Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

ros

lz4

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

like image 434
Abdelrahman Emam Avatar asked Nov 27 '22 13:11

Abdelrahman Emam


2 Answers

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/
like image 170
Martin Valgur Avatar answered Nov 29 '22 03:11

Martin Valgur


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/
like image 20
rgov Avatar answered Nov 29 '22 01:11

rgov