opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

opencv_python-4.9.0.80-cp37-abi3-macosx_10_16_x86_64.whl requires macOS 12.0 or later

Open kmatzen opened this issue 2 years ago • 2 comments

opencv-python was recently bumped to 4.9.0.80 on pypi. The wheel for x64 macOS seems to indicate that it's built for macOS 10.16 or later and gets pulled in by pip as a compatible package. However, upon importing the library, libvmaf.1.dylib reports that it's built for macOS 12.0 or later. The changelist for opencv-python 4.9.0.80 indicates that the minimum OS version is now macOS 12.0.

Expected behaviour

The package would be named in such a way that pip would not pull in the latest version of opencv-python for older, incompatible versions of macOS.

Actual behaviour

pip installed a version of opencv-python which required a newer version of macOS.

Steps to reproduce

OS was macOS 11.2 on an Intel Mac. pip install opencv-python.

Using cached opencv_python-4.9.0.80-cp37-abi3-macosx_10_16_x86_64.whl.metadata

Later when using cv2.

[2024-01-09T21:36:25.176Z] [MB: 77828ms][DEBUG] [17]ImportError: dlopen(<redacted>/python3.9/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: __ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj
Referenced from: <redacted>/python3.9/site-packages/cv2/.dylibs/libvmaf.1.dylib (which was built for Mac OS X 12.0)
Issue submission checklist
  • [x] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • [x] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • [x] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • [x] I'm using the latest version of opencv-python

kmatzen avatar Jan 10 '24 00:01 kmatzen

The release notes mention the MacOS 12 requirement. But the wheels then shouldn't be named after the wrong deployment target:macosx_10_16_x86_64.whl/macosx_11_0_arm64.whl. Instead they should use macosx_12_0, pip should then automatically pick a previous version.

sitic avatar Feb 21 '24 00:02 sitic

@kmatzen It appears the new opencv-python version 4.10.0.82 now has the appropriately named whl. This issue can probably now be closed.

See https://pypi.org/project/opencv-python/4.10.0.82/#files image vs previously (https://pypi.org/project/opencv-python/4.9.0.80/#files) image

jamesobutler avatar Jun 10 '24 17:06 jamesobutler