Mac OpenCV-Python安装

来源:互联网 发布:联通云计算产品 编辑:程序博客网 时间:2024/06/05 03:06

安装过程踩了一堆坑,才发现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

原创粉丝点击