-
Notifications
You must be signed in to change notification settings - Fork 990
Open
Description
Summary
Version 4.13.0.90 of opencv-python-headless (released on PyPI Jan 18, 2026) fails to import on headless Linux systems due to a dependency on libxcb.so.1.
Environment
- OS: Linux (Ubuntu-based, headless server/container)
- Python: 3.12.8
- Package:
opencv-python-headless==4.13.0.90
Steps to Reproduce
pip install opencv-python-headless==4.13.0.90
python -c "import cv2"Expected Behavior
cv2 should import successfully without requiring X11/GUI libraries.
Actual Behavior
ImportError: libxcb.so.1: cannot open shared object file: No such file or directory
Analysis
The wheel bundles xcb libraries that themselves depend on the system's libxcb.so.1:
$ ldd /path/to/site-packages/cv2/cv2.abi3.so | grep xcb
libxcb.so.1 => not found
libxcb-shm-0be6dfbf.so.0.0.0 => .../opencv_python_headless.libs/libxcb-shm-0be6dfbf.so.0.0.0
libxcb-shape-7716c890.so.0.0.0 => .../opencv_python_headless.libs/libxcb-shape-7716c890.so.0.0.0
libxcb-xfixes-6de855b8.so.0.0.0 => .../opencv_python_headless.libs/libxcb-xfixes-6de855b8.so.0.0.0The bundled libxcb-shm, libxcb-shape, and libxcb-xfixes libraries have unresolved dependencies on libxcb.so.1.
Workaround
Downgrading to 4.12.0.88 resolves the issue:
pip install opencv-python-headless==4.12.0.88Additional Notes
- Version
4.13.0.90appears on PyPI but is not listed as the latest GitHub release as of Jan 19, 2026. - The
4.12.0.88headless wheel does not have this issue.
ei-grad, dtrifiro, dominick-han, pascal-pfeiffer, Twacqwq and 5 more
Metadata
Metadata
Assignees
Labels
No labels