brew tap homebrew/science
brew install opencv
cd /Library/Python/2.7/site-packages/ 如果是anaconda切换到anaconda目录
which python 查看python目录
将brew安装的opencv两个文件连接到python site-packages下面
ln -s /usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py cv.py
ln -s /usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv2.so cv2.so
import cv2 测试
opencv3只能在python2下安装