繁体   English   中英

在Mac上为python 3.6安装opencv3

[英]install opencv3 on mac for python 3.6

我想在macOS Sierra上安装opencv3 for python 3.6。 我试图通过自制软件使用此链接http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/但我是得到这个错误

Error: opencv3: Does not support building both Python 2 and 3 wrappers

怎么解决这个?

brew install opencv3 --with-contrib --with-python3 --without-python

此错误是由此提交引起的。

使用brew edit opencv3你必须评论四行:

if build.with?("python3") && build.with?("python")
  # Opencv3 Does not support building both Python 2 and 3 versions
  odie "opencv3: Does not support building both Python 2 and 3 wrappers"
end

保存并重新运行安装:

brew install opencv3 --with-contrib --with-python3

之后,一切都适合我

我也有同样的问题,我已通过以下方式解决了这个问题:

$ brew编辑opencv3

找到以下代码块并注释所有4行:

if build.with?("python3") && build.with?("python")
  # Opencv3 Does not support building both Python 2 and 3 versions
  odie "opencv3: Does not support building both Python 2 and 3 wrappers"
end

最后使用brew install命令安装:

$ brew install opencv3 --with-contrib --with-python3

参考: http//www.pyimagesearch.com/2017/05/15/resolving-macos-opencv-homebrew-install-errors/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM