I'm trying to install opencv so I can use it in a python program. My computer is a little old and I can't update osx past 10.11. Is it still possible to install opencv? I don't need it to be opencv4 if that's an issue.
I've tried using pip, pip3, and homebrew. They all download it and then it won't actually import in python correctly. Everything eventually says that it needs to be osx 10.12.
Here's the exact error I'm getting:
File "<stdin>", line 1, in <module>
File "/anaconda3/lib/python3.7/site-packages/cv2/__init__.py", line 3, in <module>
from .cv2 import *
ImportError: dlopen(/anaconda3/lib/python3.7/site-packages/cv2/cv2.cpython-37m-darwin.so, 2): Symbol not found: _clock_gettime
Referenced from: /anaconda3/lib/python3.7/site-packages/cv2/.dylibs/libavutil.56.22.100.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /anaconda3/lib/python3.7/site-packages/cv2/.dylibs/libavutil.56.22.100.dylib
Thanks!
Try conda install :
OR
Then import
There seems to be a problem with the brew installation according to https://github.com/Homebrew/homebrew-science/issues/3024 but you can try the below too
---------- OR ----------
First, create a
venv(Virtual Enviorment)Then using brew :
OR
Then using pip :
Finally, import using :
This should work but in the case doesn't it might mean that you've installed anaconda with python in that case try:
Finally, import using :