1.升级一下brew
   $ sudo brew update

建议设置系统网络代理,否则升级过程灰常慢

2.安装opencv
   $ sudo brew tap homebrew/science
   $ sudo brew install opencv
3.在python的搜索PATH下面,添加cv库的软链接
   #查看一下opencv安装路径
   $ ls -la `brew --prefix`/Cellar/opencv/
   $ cd /Library/Python/2.7/site-packages/
   $ ln -s `brew --prefix`/Cellar/opencv/2.4.11_1/lib/python2.7/site-packages/cv.py cv.py
   $ ln -s `brew --prefix`/Cellar/opencv/2.4.11_1/lib/python2.7/site-packages/cv2.so cv2.so
4.如果需要cv3库,请自行编译

参考链接:Install OpenCV 3 (beta) on Yosemite ( OSX 10.10.x )