Skip to content

lerobot/examples /10_use_so100.md got "undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0" #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
ylyhlh opened this issue Feb 4, 2025 · 6 comments · Fixed by #883
Closed
1 of 2 tasks

Comments

@ylyhlh
Copy link

ylyhlh commented Feb 4, 2025

System Info

after running the command in instruction
 bash
conda install -y -c conda-forge ffmpeg
pip uninstall -y opencv-python
conda install -y -c conda-forge "opencv>=4.10.0"

Starting to get error, before running that, the teleoperate without camera works just fine,

> libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0

Full command and message:

(lerobot_new)  ~/lerobot  ↱ main ±  python lerobot/scripts/control_robot.py \       
  --robot.type=so100 \
  --robot.cameras='{}' \
  --control.type=teleoperate
Traceback (most recent call last):
  File "/home/martinliuhao/lerobot/lerobot/scripts/control_robot.py", line 133, in <module>
    from lerobot.common.robot_devices.control_utils import (
  File "/home/martinliuhao/lerobot/lerobot/common/robot_devices/control_utils.py", line 13, in <module>
    import cv2
  File "/home/martinliuhao/miniconda3/envs/lerobot_new/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/martinliuhao/miniconda3/envs/lerobot_new/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/home/martinliuhao/miniconda3/envs/lerobot_new/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/martinliuhao/miniconda3/envs/lerobot_new/lib/python3.10/site-packages/cv2/python-3.10/../../../.././libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0

Information

  • One of the scripts in the examples/ folder of LeRobot
  • My own task or dataset (give details below)

Reproduction

  1. running the command in instruction
conda install -y -c conda-forge ffmpeg
pip uninstall -y opencv-python
conda install -y -c conda-forge "opencv>=4.10.0"
  1. teleoperate
python lerobot/scripts/control_robot.py \
  --robot.type=so100 \
  --control.type=teleoperate

Expected behavior

The teleoperate should start without error?

@shantanuparab-tr
Copy link
Contributor

Try this, solved the problem for me.
conda install -c conda-forge jpeg libtiff

@ylyhlh
Copy link
Author

ylyhlh commented Feb 6, 2025

Thanks a lot! It works!
Wondering if the tutorial instruction should be updated?

@Cadene
Copy link
Collaborator

Cadene commented Mar 19, 2025

Actually if you run conda install -c conda-forge jpeg libtiff you might be blocked later on, since it removes ffmpeg and av1 encoder.

Instead run pip install torchvision==0.20.1 as a temporary fix. Thanks @shantanuparab-tr for finding this prefered workaround.

We are on it with @imstevenpmwork to find a fix long term.

@gu021
Copy link

gu021 commented Apr 2, 2025

Hi, now what will be the best solution? After I did " conda install -c conda-forge jpeg libtiff ", my ffmpeg was down-graded from 7.1.1 to 6.1.1. The 6.1.1 version does not enable the "libsvtav1" encoder. This wil introduce problem in recording when doing "episode_000.mp4".
I checked torchvision version. It is 0.21. Will down grade it to 0.20.1 fix the "LIBJPEG_8" issue in control_robot.py?

@shantanuparab-tr
Copy link
Contributor

shantanuparab-tr commented Apr 2, 2025

What you should do according to the new update is the following:

  1. Fetch the latest changes (if you haven't already done that).

  2. Create a new virtual environment using conda:

    conda create -n lerobot python=3.10 -y
    conda activate lerobot
  3. Install lerobot (change the extras based on the robot you're using; this one is for Aloha):

    pip install --no-binary=av -e ".[dynamixel, intelrealsense]"
  4. Install ffmpeg using conda. This is in accordance with the README, just a few additions to ensures ffmpeg version ≥ 7:

    conda install -c conda-forge 'ffmpeg>=7.0' -y

These steps should be enough to avoid any issues with encoders or jpeg12_write_raw_data.

@gu021
Copy link

gu021 commented Apr 2, 2025

Thanks shantanuparab! I will give it a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants