Sem*_*ime 20 python pip pipenv
使用 pip 安装依赖项时出现以下错误:
pip9.exceptions.InstallationError 命令“python setup.py egg_info”在 /tmp/tmpoons7qgkbuild/opencv-python/ 中失败,错误代码为 1
下面是在pipenv install opencv-python最近的 linux (5.4.0 x64) 系统上运行命令的结果。
Locking [packages] dependencies…
self.repository.get_dependencies(ireq):
File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 222, in get_legacy_dependencies
result = reqset._prepare_file(self.finder, ireq, ignore_requires_python=True)
File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 644, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 435, in run_egg_info
call_subprocess(
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/utils/__init__.py", line 705, in call_subprocess
raise InstallationError(
pip9.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmpoons7qgkbuild/opencv-python/
Run Code Online (Sandbox Code Playgroud)
Sem*_*ime 44
pip9.exceptions.InstallationError确保您的pip和版本setuptools足以用于manylinux2014 wheels.
sudo python3 -m pip install -U pip
sudo python3 -m pip install -U setuptools
Run Code Online (Sandbox Code Playgroud)
对我来说,python setup.py egg_info可能是因为最近 python 轮子的变化而失败manylinux1 wheels,manylinux2014 wheels根据open-cv faq被替换。
Dvd*_*vdG 17
我通过此链接https://www.edureka.co/community/69396/command-python-setup-info-failed-error-build-8nhf9w2t-grpcio并使用以下命令解决了类似的问题:
$ pip3 install --upgrade setuptools
$ pip3 install --upgrade pip
Run Code Online (Sandbox Code Playgroud)
我有同样的问题。
当我执行时:
pip install jupyterlab
Run Code Online (Sandbox Code Playgroud)
它抛出一个错误:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-p0u6Wd/jupyterlab
Run Code Online (Sandbox Code Playgroud)
我尝试了很多方法,但都失败了。
最后,我发现我的电脑里有一个花药点:
$ pip --version
pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7)
$ pip3 --version
pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Run Code Online (Sandbox Code Playgroud)
我使用pip3修复问题:
pip3 install jupyterlab
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
54732 次 |
| 最近记录: |