Since OpenCV3 could not be installed on anaconda (opencv 2.4.10 as of November 11, 2015). If you are not particular about opencv3, you can install it with the following command.
conda install -c https://conda.binstar.org/jjhelmus opencv
Mac OS X 10.10.1 homebrew pyenv anaconda3-2.4.0 (installed by pyenv)
brew tap homebrew/science
brew install opencv3 --with-python3
brew link opencv3 --force
% cd /Users/(username)/.pyenv/versions/anaconda3-2.4.0/lib/python3.5/site-packages
% ln -s /usr/local/Cellar/opencv3/3.0.0/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so cv2.so
Please change the path according to the version of anaconda or python. Also, for "cv2.cpython-35m-darwin.so", please look for something like that depending on your environment.
% python
Python 3.5.0 |Anaconda 2.4.0 (x86_64)| (default, Oct 20 2015, 14:39:26)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.0.0'
>>>
If there is no error when importing, the installation is successful ✨
Recommended Posts