Closed anttiryt closed 1 year ago
I'm having the same issue.
I'm having the same issue as well.
Reproduced with Mac mini M1 with MacOS 11.1:
(base) xperience@xpereince-mini-m1 venv % python3.9 -m venv .
(base) xperience@xpereince-mini-m1 venv % source ./bin/activate
(venv) (base) xperience@xpereince-mini-m1 venv % pip install --upgrade pip
Requirement already satisfied: pip in ./lib/python3.9/site-packages (21.1.1)
Collecting pip
Using cached pip-22.3.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.1
Uninstalling pip-21.1.1:
Successfully uninstalled pip-21.1.1
Successfully installed pip-22.3.1
(venv) (base) xperience@xpereince-mini-m1 venv % pip install opencv-python
Collecting opencv-python
Using cached opencv_python-4.7.0.68-cp37-abi3-macosx_11_0_arm64.whl (31.1 MB)
Collecting numpy>=1.19.3
Using cached numpy-1.24.1-cp39-cp39-macosx_11_0_arm64.whl (13.9 MB)
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.24.1 opencv-python-4.7.0.68
(venv) (base) xperience@xpereince-mini-m1 venv % python
Python 3.9.5 (default, Jun 4 2021, 05:25:09)
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xperience/asmorkalov/venv/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/Users/xperience/asmorkalov/venv/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/Users/xperience/.pyenv/versions/3.9.5/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Users/xperience/asmorkalov/venv/lib/python3.9/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/xperience/asmorkalov/venv/lib/python3.9/site-packages/cv2/.dylibs/libjxl.0.7.0.dylib (which was built for Mac OS X 12.0)
Expected in: /usr/lib/libc++.1.dylib
>>>
>>>
>>> quit()
The library is needed for FFmpeg.
The library is needed for FFmpeg.
Can you use 4.6 ?
Fixed in 4.7.0.70
pip install opencv-python==4.6.0.66 I am using macOS Big Sur 11.5. I tried with 4.7.0.72, but doesn't work, then I tried 4.6.0.66 and it worked
On macOS BigSur 11.7.10, 4.8.1.78 works, but the next version I can install, 4.9.0.80, reproduces this error.
OpenCV team uses Github Action provided VMs for Mac OS build and Brew packages for dependencies. The last release was done for MasOS 11 x86_64 and MacOS 12 arm64 due to dependencies reason. I'll take a look if we can decrease requirements for the next release, but probability is low.
I have the same issue on Mac OS Big Sur version 11.7.10
I have the same error on Mac Big Sur 11.7.10.
Exact error is this: ImportError: dlopen(/Users/Kaustubh/Library/Python/3.12/lib/python/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: ZNSt3113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj Referenced from: /Users/Kaustubh/Library/Python/3.12/lib/python/site-packages/cv2/.dylibs/libvmaf.1.dylib (which was built for Mac OS X 12.0) Expected in: /usr/lib/libc++.1.dylib
I have the same error on Mac Big Sur 11.7.10.
Exact error is this: ImportError: dlopen(/Users/Kaustubh/Library/Python/3.12/lib/python/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: ZNSt3113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj Referenced from: /Users/Kaustubh/Library/Python/3.12/lib/python/site-packages/cv2/.dylibs/libvmaf.1.dylib (which was built for Mac OS X 12.0) Expected in: /usr/lib/libc++.1.dylib
If you find a solution let me know. I got exactly the same
System Information
OpenCV python version 4.7.0.68 Operation System / Platform: Macos BigSur 11.6.7 Python version: 3.10.8
Detailed description
Using latest opencv-python from pip does not work on Big Sur.
4.6.0.66 works ok.
Symbot not found - using shared library
cv2/cv2.abi3.so, 2): Symbol not found: ZNKSt3115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
cv2/.dylibs/libjxl.0.7.0.dylib (which was built for Mac OS X 12.0)
Steps to reproduce
I don't think this is reproducable on other systems.
Issue submission checklist