[英]Error in installing OpenCV with python (MAC OSX) and PyCharm IDE
I want to install the OpenCV to then include it in PyCharm on my Mac, and I have started with the terminal following this guideline: click here我想安装 OpenCV,然后将其包含在我的 Mac 上的 PyCharm 中,并且我已经按照此指南开始使用终端: 单击此处
the problem is when I follow the third step and write this code:问题是当我按照第三步编写此代码时:
$ brew install opencv3 --with-contrib --with-python3
this error has shown:此错误显示:
Error: invalid option: --with-contrib
Of course I have installed also the PyCharm IDE for python and the latest verson of python (3.7) to be knowledged当然,我还安装了 Python 的 PyCharm IDE 和最新版本的 Python (3.7) 以供了解
please if you can help me I will appreciate that请如果你能帮助我,我将不胜感激
This problem was solved!这个问题解决了! thank you
谢谢你
According to the formula , opencv3 no longer requires these flags.根据公式,opencv3 不再需要这些标志。
CMake flags CMake 标志
-DOPENCV_ENABLE_NONFREE=ON
-DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules
enable support for contrib modules.启用对 contrib 模块的支持。
-DBUILD_opencv_python2=ON
-DBUILD_opencv_python3=ON
-DPYTHON2_EXECUTABLE=#{which "python"}
-DPYTHON2_LIBRARY=#{py2_lib}/libpython2.7.dylib
-DPYTHON2_INCLUDE_DIR=#{py2_prefix}/include/python2.7
-DPYTHON3_EXECUTABLE=#{which "python3"}
-DPYTHON3_LIBRARY=#{py3_config}/libpython#{py3_version}.dylib
-DPYTHON3_INCLUDE_DIR=#{py3_include}
provide support for Python3 as well as Python2.提供对 Python3 和 Python2 的支持。
Just run赶紧跑
brew install opencv3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.