python安装opencv3_使用Anaconda Python 3.6安装OpenCV3时遇到问题(在Mac上)

1586010002-jmsa.png

I have successfully installed anaconda with python3.6.1 on my mac. I followed the instruction from the internet:

first enter this on terminal:

conda create -n venv_demo python=3.6.1

then activate:

source activate venv_demo

However, when I tried to install openv3

I either tried the cmd line

or

conda install -c menpo opencv3

it gave me the error as following:

error showing on terminal

Could someone tell me how to fix it? Do I need to remove python 2.7? Now I have installed python 3.6.1 and have 2 versions on my mac. Thanks!

解决方案

Have a look at the list of conda installers for OpenCV in under the menpo package on Anaconda's package list:

osx-64/opencv3-3.1.0-py27_0.tar.bz2

osx-64/opencv3-3.1.0-py34_0.tar.bz2

osx-64/opencv3-3.1.0-py35_0.tar.bz2

linux-64/opencv3-3.1.0-py35_0.tar.bz2

linux-64/opencv3-3.1.0-py27_0.tar.bz2

linux-64/opencv3-3.1.0-py36_0.tar.bz2

linux-64/opencv3-3.1.0-py34_0.tar.bz2

linux-64/opencv3-3.2.0-np111py35_0.tar.bz2

linux-64/opencv3-3.2.0-np111py34_0.tar.bz2

linux-64/opencv3-3.2.0-np111py27_0.tar.bz2

win-32/opencv3-3.1.0-py27_0.tar.bz2

win-64/opencv3-3.1.0-py35_0.tar.bz2

win-32/opencv3-3.1.0-py35_0.tar.bz2

win-64/opencv3-3.1.0-py34_0.tar.bz2

win-32/opencv3-3.1.0-py34_0.tar.bz2

win-64/opencv3-3.1.0-py27_0.tar.bz2

Notice the Python versions listed in each installer. For macOS, the newest menpo installer is OpenCV 3.1.0 and works on Python 3.5. So if you want to use the menpo installer, simply create a new environment with Python 3.5, activate, and then install:

conda create -n python=3.5

source activate

conda install -c menpo opencv3

Otherwise if you want to use Python 3.6 (which is a really great Python release), you'll need to build from source. See the great answer from this Stack Overflow question: Can't install OpenCV3 on Anaconda3 python3.6 on macOS.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值