0

I'm trying to install the opencv module without success, I think the problem is related to the version of python I'm using. Indeed I upgraded to the 3.9.1 version but when I'm trying to install the module, I still receive a warning referred to the old version of python I had (i.e. 2.7). How can I get rid of this situation and successfully install the opencv library?

Error in bash

1 Answer 1

2

The issue is because the pip you are using in the insallation command conforms to pip2 which is used for installing packages for python2 (as is evident from the command output). You can verify the version by running:

pip --version

To solve the issue, use pip3:

sudo -H pip3 install opencv-python

If pip3 is not installed, install it via HomeBrew:

brew install python3

It should install pip3 as well. Also, have a look at this.

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.