. Advertisement .
..3..
. Advertisement .
..4..
If you have suddenly started getting the error “Could not find a version that satisfies the requirement cv2 (from versions: ) No matching distribution found for cv2”, then it can be a real nightmare. The problem seems to appear out of nowhere and no amount of troubleshooting seems to fix it. Here is one of the most effective ways to fix this error. Read on.
When dose this error happen?
When attempting to install CV2 with pip install –user cv2, you may get the following error.
Collecting cv2
Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2
Since the names opencv and cv2 aren’t python package names, you’re getting this error. if you are using python 3.4 and asking How to fix these and install the packages properly? below message is the simple and effective solutions for your problem.
How To Fix The Error “Could not find a version that satisfies the requirement cv2 (from versions: ) No matching distribution found for cv2”?
Option 1: Install opencv-python
Since the names opencv and cv2 are not python package names, you are getting this error. Both packages are included in the opencv-python package, which can be installed via pip. Simply run this command to install opencv-python.
For Python 2
pip install opencv-python
For Python 3
pip3 install opencv-python
Now, your error has been fixed, you can utilize opencv and cv2.
Option 2: Utilize proper Python command
You’re utilizing the incorrect Python command. Simply type this command.
pip install opencv-python
Conclusion
We hope you enjoyed our blog post on how to solve the bug “Could not find a version that satisfies the requirement cv2 (from versions: ) No matching distribution found for cv2”. Please leave a comment if you have any further questions or concerns regarding this topic. Thank you for taking the time to read; we are always delighted anytime one of our pieces can give important information on this topic!
I had the same problem. and I fix it well with the following solution if you are using Windows 10.
Open CMD:
win+r
then typecmd
. Now,pip install virtualenv
virtualenv testopencv
cd testopencv
.\Scripts\activate
pip install opencv-contrib-python --upgrade
Python
thenimport cv2
hit enter then addprint(cv2.__version__)
to check if its installedOpen a new cmd,
win + r then type cmd
, repeat step 6.If it gives you an error -> Go inside the folder of
testopencv
, insidelib
. Copy all -> go to your python directory, insidelib
folder paste it and skip that are already present.Then, open a new cmd, repeat
Step 6
.