简体   繁体   English

错误:命令出错,退出状态为 1

[英]ERROR: Command errored out with exit status 1

I tried:我试过:

pip3 install -r requirements.txt

Here's the error I received:这是我收到的错误:

 Command "python setup.py egg_info" failed with error code 1 in 
 C:\Users\Admin\AppData\Local\Temp\pip-install-6c3rea1s\pycocotools\
 You are using pip version 19.0.3, however version 20.0.2 is available.
 You should consider upgrading via the 'python -m pip install --upgrade pip'
 command.

So, I tried:所以,我试过:

pip install --upgrade pip

and

install pip3 install -r requirements.txt

That resulted in more errors:这导致了更多错误:

 ERROR: Command errored out with exit status 1:      command:
 'c:\users\admin\appdata\local\programs\python\python37-32\python.exe'
 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\setup.py'"'"';
 __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\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
 'C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\pip-egg-info'
         cwd:
 C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\
    Complete output (5 lines):  Traceback (most recent call last):   
 File "<string>", line 1, in <module>     File
 "C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\setup.py",
 line 2, in <module>        from Cython.Build import cythonize
    ModuleNotFoundError: No module named 'Cython'
    ---------------------------------------- ERROR: Command errored out
 with exit status 1: python setup.py egg_info Check the logs for full
 command output.

I deleted the folder and re-install, but the results remained the same.我删除了该文件夹并重新安装,但结果保持不变。

This is a bug in pycocotools .这是pycocotools 中的一个错误。 The bug was fixed in 2017 but it seems the fix didn't get into release 2.0 in 2018 (I guess the release process is also buggy).该错误已于2017年修复但似乎该修复程序并未在 2018 年发布到 2.0 版(我猜发布过程也有问题)。

There is also another similar bug in setup.py — it imports numpy before installing it. setup.py还有另一个类似的错误——它在安装之前导入numpy

There is no simple workarounds for these bugs using requirements.txt .使用requirements.txt没有针对这些错误的简单解决方法。 You need to install the required modules before installing pycocotools :在安装pycocotools之前,您需要安装所需的模块:

pip install Cython numpy
pip install -r requirements.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Halberd - 错误:命令出错,退出状态为 1: - Halberd - ERROR: Command errored out with exit status 1: 错误:命令出错,退出状态为 1:(帮助!!!) - ERROR: Command errored out with exit status 1: (help!!!) 命令出错,退出状态为 1: - Command errored out with exit status 1: 错误:命令出错,退出状态为 1:(非常长的命令) - Error: Command errored out with exit status 1: (really long command) Pip 安装错误与 pycontractions '错误:命令错误退出状态 1:' - Pip install error with pycontractions 'ERROR: Command errored out with exit status 1:' 安装 pySpark 会出现此错误:错误:命令错误退出状态为 1 - Installing pySpark gives this error : ERROR: Command errored out with exit status 1 Python - Mysqldb 安装错误 [错误:命令错误退出状态 1:] - Python - Mysqldb install Error [ ERROR: Command errored out with exit status 1:] 错误:命令出错,退出状态为 1:Python 3.8 - ERROR: Command errored out with exit status 1:Python 3.8 错误:安装 Kivy 时命令出错,退出状态为 1 - ERROR: command errored out with exit status 1 when installing Kivy 安装 pytorch 时出现“Command errored out with exit status 1”错误 - “Command errored out with exit status 1” error while installing pytorch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM