4

everyone.

My problem is that I need the last version of OpenCV (4.3.0) to run a code but when I checked my version of opencv with the line:

print(cv2.__version__) 

it said that my version of cv2 is the 3.4.2. So I went into my anaconda, environment, I marked opencv for upgrade, but it seems it is the last version it can install. So I tried a command in the cmd.prompt of anaconda :

pip install --upgrade opencv-python==4.3.0.36 

And then, when I checked "opencv" in the installed modules of my anaconda environment, I saw two opencv. One is "opencv" version 3.4.2, and then, just below, there is "opencv-pyton" version 4.3.0. BUT, when I checked again my version of cv2 with "print(cv2.version)", it was still telling me that my version is 3.4.2 (I also tried to uninstall the opencv 3.4.2 to see if anaconda would then take into account the opencv-pyton 4.3.0 but no, it gives me an error).

Does anyone have an idea how to upgrade my version of opencv with anaconda ? Thanks everyone.

1 Answer 1

1

You may be missing the conda-forge channel in your .condarc settings.

try this to install from conda-forge:

conda install -c conda-forge opencv=4.3.0 
Sign up to request clarification or add additional context in comments.

2 Comments

I tried that but then I got the error : Executing transaction: | WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(140): Could not remove or rename C:\Users[my name]\anaconda3\envs\tensorflow\Library\resources\icudtl.dat. Please remove this file manually (you may need to reboot to free file handles) ERROR conda.core.link:_execute(700): An error occurred while installing package 'conda-forge::qt-5.12.5-h7ef1ec2_0'. Rolling back transaction: done Should I delete this file ? I don't know what it does and I don't want to make a mistake by deleting something important
Its safer to rename the file instead. Then you can always revert if there are any errors somewhere else. Based on the warning, removing this file is part of the process of installing the qt package so should be safe either way.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.