I was able to successfully install the OpenCV Wheel on my Mac, but when I try to import the module, I get the following error:
(python35) iMac > python
Python 3.5.4 |Anaconda custom (64-bit)| (default, Oct 5 2017,
02:58:14)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] 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/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/__init__.py", line 4, in <module>
from .cv2 import *
ImportError: dlopen(/Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/cv2.cpython-35m-darwin.so, 2): Library not loaded: /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
Referenced from: /Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/.dylibs/libavcodec.57.107.100.dylib
Reason: image not found
>>> `
I downloaded the wheel from this site .
OS Version:
(python35) iMac > sw_vers -productVersion
10.10.5
(python35) iMac >
When I do the installation, I see no errors or other problems:
iMac > pip install opencv_python-3.3.1.11-cp35-cp35m-
macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_
intel.macosx_10_10_x86_64.whl
Processing ./opencv_python-3.3.1.11-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already satisfied: numpy>=1.11.1 in /Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages (from opencv-python==3.3.1.11)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.3.1.11
iMac >
I tried to crack the cv.so library link, but without joy:
lrwxrwx--- 1 AntoliMac01 staff 25 Dec 24 12:14 cv2.so -> cv2.cpython-35m-darwin.so
I tried building through Homebrew with no success.
I tried 'opencv_contrib' with the same result as above.
I searched the Internet all over the world but cannot find a solution. I am completely puzzled.
Any help would be greatly appreciated.
Joe