- Notifications
You must be signed in to change notification settings - Fork900
Closed
Labels
Description
System Information
OpenCV python version: 4.7.0.68
Operating System / Platform:quay.io/pypa/manylinux_2_24_x86_64
Python version: 3.8+
ZLIB version: 1.2.8
OpenCV python version: 4.7.0.68
Operating System / Platform:quay.io/pypa/manylinux2014
Python version: 3.8+
ZLIB version: 1.2.7
Detailed description
The latest opencv (4.7.0.68) requiresZLIB >= 1.2.9
. This upgrade introduces fatal backward compatibility issue, since the dominant platforms likemanylinux2014
andmanylinux_2_24_x86_64
can't meet the requirement, especially the related wheels are shipped with platform tagmanylinux2014_x86_64
. As a consequence, running the latest opencv (4.7.0.68) on those platforms raises theversion ZLIB_1.2.9 not found
error.
Steps to reproduce
docker run --rm -it quay.io/pypa/manylinux2014_x86_64/opt/python/cp38-cp38/bin/pip install opencv-python-headless/opt/python/cp38-cp38/bin/python -c'import cv2 as cv'
docker run --rm -it quay.io/pypa/manylinux_2_24_x86_64/opt/python/cp38-cp38/bin/pip install opencv-python-headless/opt/python/cp38-cp38/bin/python -c'import cv2 as cv'
The log ofpip
:
[root@ca5e3a59f0c9 /]# /opt/python/cp38-cp38/bin/pip install opencv-python-headlessCollecting opencv-python-headless Downloading opencv_python_headless-4.7.0.68-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.2/49.2 MB 9.1 MB/s eta 0:00:00Collecting numpy>=1.17.0 Downloading numpy-1.24.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 9.8 MB/s eta 0:00:00Installing collected packages: numpy, opencv-python-headlessSuccessfully installed numpy-1.24.1 opencv-python-headless-4.7.0.68
Example of the error:
root@7f7608188ff0:/# /opt/python/cp38-cp38/bin/python -c 'import cv2 as cv'Traceback (most recent call last): File"<string>", line 1,in<module> File"/opt/python/cp38-cp38/lib/python3.8/site-packages/cv2/__init__.py", line 181,in<module>bootstrap() File"/opt/python/cp38-cp38/lib/python3.8/site-packages/cv2/__init__.py", line 153,in bootstrap native_module = importlib.import_module("cv2") File"/opt/python/cp38-cp38/lib/python3.8/importlib/__init__.py", line 127,in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)ImportError: /lib/x86_64-linux-gnu/libz.so.1: version`ZLIB_1.2.9' not found (required by /opt/_internal/cpython-3.8.16/lib/python3.8/site-packages/cv2/../opencv_python_headless.libs/libpng16-186fce2e.so.16.37.0)
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)