I have followed this tutorial to install opencv: https://medium.com/@nuwanprabhath/installing-opencv-in-macos-high-sierra-for-python-3-89c79f0a246a
I have two different virtual environments setup.
On one cv2 works fine. On the other one I get:
ImportError: dlopen(/Users/me/.virtualenvs/py3cv/lib/python3.6/site-packages/cv2.so, 2): no suitable image found. Did find:
/Users/me/.virtualenvs/py3cv/lib/python3.6/site-packages/cv2.so: mach-o, but wrong architecture
/usr/local/Cellar/opencv/3.4.1_5/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so: mach-o, but wrong architecture
the working interpreter shows:
Python 3.6.4 (default, Dec 25 2017, 14:57:56)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
when I go into python.
when I run import ctypes;print(ctypes.sizeof(ctypes.c_void_p))
I get: 8
The breaking one shows:
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
when I run import ctypes;print(ctypes.sizeof(ctypes.c_void_p))
:
I get: 4
any ideas what is going wrong?
output of name -a
Darwin MyMBP 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64