如何使用 pip install 修复“命令错误,退出状态为 1”

新手上路,请多包涵

我在使用 pip install 如下所示:

操作系统:CentOS 7

蟒蛇:蟒蛇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.

原文由 Antoine ESCOURROU 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 639
1 个回答

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

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

 pip install -U pip setuptools

然后重试 pip install pytype

原文由 phd 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题