安装过程踩了一堆坑,才发现brew安装完毕后下面会有接下来提示,按照提示,复制命令运行即可安装完成
1、
brew tap homebrew/science
2、
brew install opencv
3、
安装完毕看底部提示
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
1、
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
2、
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth