执行此命令时:
pip3 install opencv-python
我得到以下错误:
Installing build dependencies ... error ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-z4c_sn6u/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
Complete output (22 lines):
Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
Collecting setuptools
Downloading setuptools-49.6.0-py3-none-any.whl (803 kB)
Collecting wheel
Downloading wheel-0.35.0-py2.py3-none-any.whl (24 kB)
Collecting scikit-build
Using cached scikit_build-0.11.1-py2.py3-none-any.whl (72 kB)
Collecting cmake
Using cached cmake-3.18.0.tar.gz (28 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-95tsmt_u/cmake/setup.py'"'"'; __file__='"'"'/tmp/pip-install-95tsmt_u/cmake/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-95tsmt_u/cmake/pip-egg-info
cwd: /tmp/pip-install-95tsmt_u/cmake/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-95tsmt_u/cmake/setup.py", line 7, in <module>
from skbuild import setup
ModuleNotFoundError: No module named 'skbuild'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-z4c_sn6u/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.
当我尝试安装ecapture时,我使用的也是最新的python版本
pypi网站上的安装和使用指南说
Pip安装失败,ModuleNotFoundError:没有名为“skbuild”的模块
自opencv python版本4.3.0.*以来,manylinux1控制盘被manylinux2014控制盘取代。如果您的pip太旧,它将尝试使用4.3.0.38中引入的新源代码发行版手动构建OpenCV,因为它不知道如何安装manylinux2014控制盘。然而,源代码构建也会失败,因为太旧的pip,因为它不理解pyproject.toml中的构建依赖项。要使用新的manylinux2014预制控制盘(或从源代码构建),您的pip版本必须为>;=19.3.
请使用
升级pip
pip install --upgrade pip
我面临着类似的情况:
Dockerfile:
requirements.txt:
运行
docker-compose up &
时,我收到以下错误:我尝试了升级
pip3
的建议解决方案,但遇到了同样的问题对我有效的是在
requirements.txt
中修复opencv-python
版本。以前,它是拉版本4.4.0.40
。我将requirements.txt
改为:尝试使用升级您的pip
然后运行
相关问题 更多 >
编程相关推荐