Install Xcode Command Line Tools for easing later processes.
c.f. Stack Overflow threadxcode-select --install
Install OpenCV.
Now install python modules for OpenCV.$ brew install gcc $ brew install opencv3
You have to provide a shared library for it. This is the key step.$ pip install cv2
Test if it works.$ pushed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages $ ln -s /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2.so $ popd
It should finish without showing any error.$ python >>> import cv2 >>>
If this is for your virtualenv, do similarly in your venv directory.
No comments:
Post a Comment