opencv-python for Python 3.10, "Could not find a version that satisfies the requirement"

Question:

I am trying to install opencv with python using pip install opencv-python but I am getting this error

ERROR: Command errored out with exit status 1:
   command: 'C:Program FilesPython310python.exe' 'C:UsersgnaraAppDataLocalTemppip-standalone-pip-_33ltocw__env_pip__.zippip' install --ignore-installed --no-user --prefix 'C:UsersgnaraAppDataLocalTemppip-build-env-xl8kjguhoverlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.11.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"''
       cwd: None
  
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56)
ERROR: No matching distribution found for opencv-python
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:Program FilesPython310python.exe -m pip install --upgrade pip' command.

Asked By: Gautam Narayan

||

Answers:

Looks like there is no opencv-python for Python 3.10yet. Be patient.

This issue is being tracked already: https://github.com/opencv/opencv-python/issues?q=3.10

Answered By: Christoph Rackwitz

I have installed OpenCV with Python 3.10 on M1 using pip install opencv-python

I hope it will work on Windows and Linux as well.

Answered By: Sharmaji

pip install opencv-python worked for me.

I had a clean environment (anaconda prompt), did not even install pip, but it still worked.
My steps:

  • conda create -n envname
  • conda activate envname
  • conda install -c anaconda numpy (I needed numpy, it installed python 3.10)
  • conda install opencv-python (did not work, prompt adviced me to search in other channel.)
  • pip install opencv-python (as sharmaji adviced)

Everything works and my program that did not work bevore because opencv was missing, now works to.

Numpy 1.22.3 , opencv-python 4.6.0.66 and python 3.10.4

A lot more as well, but that’s outside the scope of this topic.

Answered By: GLARKI
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.