Closed
Description
System Information
OpenCV Python Version: 4.9.0.80
Operating System / Platform: MacOS Sonoma 14.3
Python Version: 3.10
Detailed description
I am attempting to use opencv-python within Blender's Python scripting environment.
After reading through many issues, e.g., #429, OpenCV claims that arm64 is supported. So I tried:
./python3.10 -m pip install opencv-python
This command works, but is apparently installing the x86 package rather than arm64. Thus, Blender's scripting environment (natively arm64) doesn't like it:
ImportError: dlopen(/Users/charlie/.local/lib/python3.10/site-packages/cv2/cv2.abi3.so, 0x0002): tried: '/Users/charlie/.local/lib/python3.10/site-packages/cv2/cv2.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/charlie/.local/lib/python3.10/site-packages/cv2/cv2.abi3.so' (no such file), '/Users/charlie/.local/lib/python3.10/site-packages/cv2/cv2.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
How do I install binaries that work for my OS?
Steps to reproduce
- Have an arm64-based Mac
- Install opencv-python
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)