如何使用pip安装修复``退出状态为1的命令错误''

时间:2020-03-16 16:19:45

标签: python pip centos7 pytype

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

OS:CentOS 7

Python:Python3.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.

感谢您的帮助!

2 个答案:

答案 0 :(得分:7)

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

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

pip install -U pip setuptools

,然后重试pip install pytype

答案 1 :(得分:-1)

当我将python更新到3.9版时,我无法在pycharm中安装pandas和numpy,这给了我一个错误“命令错误,退出状态为1”。解决方案是安装旧版本的python 3.8.5并用作解释器。