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

3

9

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

Burbank answered 7/11, 2019 at 18:30 Comment(0)
V
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/
Ventriloquy answered 15/7, 2021 at 11:4 Comment(0)
P
3

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/
Pol answered 2/2, 2022 at 3:19 Comment(0)
K
-2

This worked for me

 pip install lz4 #for python2
 pip3 install lz4 #for python3
Kowtko answered 20/7, 2020 at 6:16 Comment(1)
the poster explicitly said he did that and did not workProtrusion

© 2022 - 2024 — McMap. All rights reserved.