opencv-python-headless 4.13.0.90 requires system libxcb.so.1, breaking headless environments
envgap__opencv__opencv-python-1183
01 / FAILURE SIGNATURE
As reported upstream
ImportError: libxcb.so.1: cannot open shared object file: No such file or directory
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
9faa612f0e1df6c6ef7682bcb59cb07e669bd2b5- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
opencv/opencv-python #1183 · read the original issue
## 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
```bash
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`:
```bash
$ 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.0
```
The 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:
```bash
pip install opencv-python-headless==4.12.0.88
```
## Additional Notes
- Version `4.13.0.90` appears on PyPI but is not listed as the latest GitHub release as of Jan 19, 2026.
- The `4.12.0.88` headless wheel does not have this issue.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]