Skip to content

opencv-python-headless 4.13.0.90 requires system libxcb.so.1, breaking headless environments #1183

@petrchmelar

Description

@petrchmelar

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.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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions