【问题标题】:How to fix 'Command errored out with exit status 1' with pip install如何使用 pip install 修复“退出状态为 1 的命令出错”
【发布时间】:2020-03-16 16:19:45
【问题描述】:

我在使用pip install 安装 pytype 时遇到了一些问题,如下所示:

操作系统:CentOS 7

Python:Python 3.6

点数:20.0.2

$ pip3 install pytype
Collecting pytype
  Using cached pytype-2020.2.20.tar.gz (1.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /home/aeu1/venv/bin/python3 /home/aeu1/venv/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp34nr30o0
       cwd: /tmp/pip-install-z9y24cb4/pytype
  Complete output (7 lines):
  running egg_info
  writing pytype.egg-info/PKG-INFO
  writing dependency_links to pytype.egg-info/dependency_links.txt
  writing entry points to pytype.egg-info/entry_points.txt
  writing requirements to pytype.egg-info/requires.txt
  writing top-level names to pytype.egg-info/top_level.txt
  error: package directory 'find:' does not exist
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/aeu1/venv/bin/python3 /home/aeu1/venv/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp34nr30o0 Check the logs for full command output.

【问题讨论】:

  • 检查日志以获取完整的命令输出。你做到了吗?
  • pip install -U pybind11 成功了

标签: python pip centos7 pytype


【解决方案1】:

那个包目录find:来自setup.cfg;它实际上不是包目录,而是setuptools 查找要安装的子目录列表的指令。

我成功安装了 Python 2.7 和 3.5 的软件包。所以我的建议是升级pipsetuptools

pip install -U pip setuptools

然后重试pip install pytype

【讨论】:

    【解决方案2】:

    当我将 Python 更新到 3.9 版时,我无法在 PyCharm 中安装 PandasNumPy,这给了我一个错误,“Command errored out with exit status 1”。

    解决方案是安装旧版本的 Python 3.8.5 并将其用作解释器。

    【讨论】:

    • 阅读问题!它说使用 python 3.6
    • 谢谢@samb003,我也通过谷歌来到这个页面,寻找相同错误的解决方案,但在 Mac OS Big Sur 上的 PyCharm 中(虽然这不是最初的问题)。您将 Python 从 3.9 降级到 3.8 的建议解决了这个问题。将此注释留在这里以防其他人遇到相同/类似的问题。
    猜你喜欢
    • 2020-08-14
    • 1970-01-01
    • 2021-07-12
    • 1970-01-01
    • 1970-01-01
    • 2020-07-23
    • 2020-07-19
    • 1970-01-01
    • 2018-09-21
    相关资源
    最近更新 更多