opencv-python for Python 3.10,“无法找到满足要求的版本”

t5fffqht  于 2022-11-24  发布在  Python
关注(0)|答案(3)|浏览(242)

我尝试使用pip install opencv-python安装带有python的opencv,但出现此错误

ERROR: Command errored out with exit status 1:
   command: 'C:\Program Files\Python310\python.exe' 'C:\Users\gnara\AppData\Local\Temp\pip-standalone-pip-_33ltocw\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\gnara\AppData\Local\Temp\pip-build-env-xl8kjguh\overlay' --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 Files\Python310\python.exe -m pip install --upgrade pip' command.
c9x0cxw0

c9x0cxw01#

看起来Python 3.10没有opencv-python ...还没有。请耐心等待。
已在跟踪此问题:https://github.com/opencv/opencv-python/issues?q=3.10

4ktjp1zp

4ktjp1zp2#

我已经使用pip install opencv-python在M1上安装了带有Python 3.10的OpenCV
我希望它也能在Windows和Linux上工作。

nhn9ugyo

nhn9ugyo3#

pip install opencv-python对我很有效。
我有一个干净的环境(Python提示),甚至没有安装pip,但它仍然工作。我的步骤:

  • conda create -n envname
  • conda activate envname
  • conda install -c anaconda numpy(我需要numpy,它安装了python 3.10)
  • conda install opencv-python(不起作用,提示建议我在其他频道搜索。)
  • pip install opencv-python(如Sharmaji建议)

一切工作和我的程序,没有工作之前,因为opencv失踪,现在的工作。
Numpy 1.22.3,开放式语言-Python 4.6.0.66和Python 3.10.4
还有很多,但这超出了本主题的范围。

相关问题