0
votes

I've installed opencv with pip install opencv_python. but when i tried to import cv2 in the interpreter,

I get this error message :

Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2/init.py", line 4, in from .cv2 import * ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2/cv2.so, 2): Symbol not found: _clock_gettime Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib (which was built for Mac OS X 10.12) Expected in: /usr/lib/libSystem.B.dylib in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib

I've installed ffmpeg but still get this error. How can i make thing work fine please

1
I've finally made it work! I've just installed 3.1.0.0 of opencv_python. Thank you alltonton_coucout

1 Answers

0
votes

I first removed opencv_python using

pip uninstall

and then using conda and condo-forge

conda install opencv==3.1.0

which worked. I then did a

conda update opencv

and was updated to opencv 3.3.1 and my import of cv2 worked fine