. Advertisement .
..3..
. Advertisement .
..4..
Python is a general-purpose, high-level programming language created by Guido van Rossum and first released in 1991. Python is designed with the strong advantage of being easy to read, learn, and remember.
When you try to do anything automated in the tool, the following error appears: “Could not find a version that satisfies the requirement opencv (from versions: ) No matching distribution found for opencv in Python“. Don’t worry too much. This post will support you in resolving the error with the best solution.
When Will The Error “Could not find a version that satisfies the requirement opencv (from versions: ) No matching distribution found for opencv in Python” Occur?
You are attempting to install opencv using the command pip install –user opencv, but you are getting the following error.
Collecting opencv
Could not find a version that satisfies the requirement opencv (from versions: )
No matching distribution found for opencv
The Effective Solutions For The Error
Now, we will discuss some of the best solutions that will benefit you.
Solution 1: Install the opencv-python
You are getting this error because opencv and cv2 are not Python package names. Both packages are included in the opencv-python package, downloaded from pip. Run this command to install opencv-python.
For Python 2, you can use this code.
pip install opencv-python
For Python 3, you can use this code.
pip3 install opencv-python
Now that your error has been resolved, you can use opencv and cv2.
Solution 2: Use the correct python command
You are using the incorrect Python command. Use this command.
pip install opencv-python
The above code may resolve your error.
Solution 3: For using Ubuntu
Run below command line on terminal to install opencv:
sudo apt-get install libsm6 libxrender1 libfontconfig1
Then reboot the machine and run this command:
!pip install opencv-contrib-python
Conclusion
There are a lot of programming documents out there that interpret Python concepts in different ways. But most of them seem quite confusing for those just starting to learn this programming language.
Those simple approaches presented above are solutions to the aforementioned major error: “Could not find a version that satisfies the requirement opencv (from versions: ) No matching distribution found for opencv in Python“.
Please leave all your concerns in the comments section if you have any further questions about this error. Lastly, I wish you all an effective day with your tool.
I tried uninstalling and reinstalling numpy and opencv-python, and it was successful. Try running the following commands:
Firstly, uninstall:
Then, install again: