python - 无法在Python 3.9上使用pip安装Open CV

标签 python opencv

 ERROR: Command errored out with exit status 1: 'e:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mmusa\\AppData\\Local\\Temp\\pip-install-z5zd5j52\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\mmusa\\AppData\\Local\\Temp\\pip-install-z5zd5j52\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mmusa\AppData\Local\Temp\pip-record-wre2z2vk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\overlay' --compile --install-headers 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\overlay\Include\numpy' Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\python\python.exe' 'e:\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\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'"'"'' Check the logs for full command output.
安装opencv时出现此错误。我已经升级了pip,目前正在使用Python 3.9。任何帮助,将不胜感激

最佳答案

我在这里下载现代机器学习库时遇到了同样的问题(TensorFlow,sci-kit learning),所以看到TensorFlow文档(官方)表明我们应该使用python 3.3-3.8进行安装。我尝试了一下,幸运的是,它奏效了。希望对你有帮助!因此,根据我的说法,您还应该安装python 3.8

关于python - 无法在Python 3.9上使用pip安装Open CV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64629555/

相关文章:

python - 类型错误 : 'key' is an invalid keyword argument for this function

opencv - 图像 3D 旋转 OpenCV

python - Opencv的getPerspectiveTransform方法给出不清楚的结果

python - 直方图计算中的数组更改值逻辑

python - 内置的 iter() 有什么意义?

Python 干+请求 : Not switching circut/changing IP address when using a session

python - 当比较不同的数据类型时,我可以让 Python 抛出异常吗?

python - 如何使用正则表达式提取 Pandas 数据框中的特定内容?

python - Django 中的单元测试 : How to initialize database

opencv - 使用 appsrc 和 vaapiencode_h264 插件时的 GStreamer 管道问题