install opencv3 on mac for python 3.6

℡╲_俬逩灬. 提交于 2019-12-03 05:56:00
bianbian

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

this error is caused by this commit.

With brew edit opencv3 you have to comment the four lines:

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

save and rerun the installation:

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

after that everything works for me

I also had the same issue and I have resolved the issue in the following way:

$ brew edit opencv3

Find the following code block and comment all the 4 lines:

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

Finally install using the brew install command:

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!