You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
Yes, it is remarkable to see the barren state of Python and its dependents on MacOS. Cursory Google searching ("have 'x86_64', need 'arm64'") reveals thousands of people crying out in desperation. It appears all this pain and suffering could be resolved by—I kid you not—fixing platform auto-detection.
I was able to resolve by specifying --subdir osx-arm64 on my miniforge. How was I supposed to know that? How would anyone know to do that? Is the real answer to platform-specific build issues, "learn platform-specific incantations?" I spent my entire morning looking around the internet for this bit of forbidden fruit. It was actually ChatGPT that gave me the info, and it was so obscure I thought it had hallucinated it—miniforge docs don't even mention it.
In the year of our Lord 2024, 3+ years after ARM64 became the default for every new user on MacOS, these people still need to specify incantations on the command-line to get their platform working. Absolutely unforgivable.
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:
This command works, but is apparently installing the x86 package rather than arm64. Thus, Blender's scripting environment (natively arm64) doesn't like it:
How do I install binaries that work for my OS?
Steps to reproduce
Issue submission checklist
The text was updated successfully, but these errors were encountered: