python3安装
先用brew安装python3
brew install python3
opencv3安装
brew install opencv3 --with-python3
拷贝cv2.so
ln -s /usr/local/Cellar/opencv3/3.2.0/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so /usr/local/lib/python3.6/site-packages/cv2.so
测试
python
Python 3.6.0 (default, Feb 20 2017, 12:40:53)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>
网友评论