I was installed OpenCV 3.1 on mac OSX, I also create a symlink in
/Library/Python/2.7/site-packages:
cv2.so -> /usr/local/Cellar/opencv3/3.1.0_3/lib/python2.7/site-packages/cv2.so
But when I import cv2 in terminal i got this error:
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/cv2.so, 2): Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib
Referenced from: /usr/local/Cellar/opencv3/3.1.0_3/lib/libopencv_imgcodecs.3.1.dylib
Reason: image not found
Then I tried to install webp using mac port:
sudo port install webp
But after that i still got the error above when import cv2 in python:
ImportError: dlopen(/Library/Python/2.7/site-packages/cv2.so, 2): Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib