Opencv not installing on Anaconda prompt

Question:

In order to download OpenCV on through Anaconda prompt, I run the following:

conda install -c conda-forge opencv

However, whenever I try to download, there I get the messages of

failed with initial frozen solve. Retrying with flexible solve. Failed with repodata from current_repodata.json, will retry with next repodata source

This would continue as the prompt tries to then diagnose what conflicts there are in my system that could prevent OpenCV from downloading.

I kept my laptop on over night, but when I woke up in the morning, there was still diagnosing for potential conflicts going on. I’m not too sure what to do at this point. I just started trying again, but the same issues are being experienced.

I am trying to download OpenCV so that I can import cv2 to work on machine learning projects for object/image detection.

I have also tried pip install -c anaconda opencv but am having the same issues.

Asked By: PKrange

||

Answers:

Please note that to import cv2, the library/package to install is called opencv-python.

From Jupyter notebook, you can try !pip install opencv-python

If you’re using anaconda, you can try conda install -c conda-forge opencv-python

Answered By: perpetualstudent