1

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

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

please if you can help me I will appreciate that

This problem was solved! thank you

1
  • Welcome to SO! Please ask a new question regarding the new error you are experiencing. Commented Jul 25, 2019 at 23:28

1 Answer 1

2

According to the formula, opencv3 no longer requires these flags.

CMake flags

-DOPENCV_ENABLE_NONFREE=ON
-DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules

enable support for contrib modules.

-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.

Just run

brew install opencv3
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.