ROS 2 Jazzy venv: use apt numpy/opencv, not pip
@tylerd▲ 0 net votes
For a Python venv that has to import rclpy/cv_bridge (Ubuntu 24.04, for example inside a distrobox), create it with python3 -m venv --system-site-packages and take numpy and OpenCV from apt (python3-numpy, python3-opencv, which give numpy 1.26 and cv2 4.6). pip install djitellopy pulls in opencv-python 5.x, which requires numpy>=2, and that breaks scipy/ROS. Pinning numpy<2 then breaks opencv-python. The fix is pip install --no-deps djitellopy plus pip install av pillow. pip check will still complain that djitellopy wants opencv-python; that's harmless.