1

I want to make python 3.9 to be the main python to install opencv it keeps getting erorrs

python 3.9 existing in 2 locations

everything in anaconda is using I think python 3.9

but I want to use 3.9 in cmd and powershell because 3.7 only work

this error appears in pip install any package on cmd or powershell

enter image description here enter image description here enter image description here enter image description here

enter image description here

mero
  • 179
  • 1
  • 8

1 Answers1

2

You need to either reinstall Anaconda or remove the package that is causing the issue from your python install location.

This user also had the same issue and they fixed it by reinstalling Anaconda, someone suggested that they can try manually deleting the google_auth package that was causing the issue.

To find the location of the site package run this command.

python -m site --user-site

You should get an output like this

C:\Users\%USERNAME%\AppData\Roaming\Python\Python39\site-packages

You can go there and delete the files that were causing the issue.

If you cannot find the package there (which would be very odd based on your screenshots)

you can try

python -c "import site; print(site.getsitepackages())"

And try removing the package from there.

If none of those work, you sadly will most probably have to reinstall anaconda or python.

kinshukdua
  • 1,944
  • 1
  • 5
  • 15
  • anaconda evnv now work on python 3.9, but windows cmd is working on 3.8 and pip is not recognized , as in last image, I want to change to 3.9 and to make pip works to install opencv , what should I do now? – mero May 13 '21 at 05:42
  • @mero Why install the package through pip if you're using Conda? I would suggest learning some of the basics of Conda first, too.¸ – AMC May 13 '21 at 16:47