PIP无法安装错误代码为1的软件包

时间:2018-10-03 15:30:13

标签: python cmd pip

我在PC上安装了Python 3.7,并且还安装了PIP。我需要安装一个软件包(auto-py-to-exe),但是每次尝试都会失败:

Command "c:\users\user\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-hju2c6l9\\gevent\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-vca2l5gm\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-install-hju2c6l9\gevent\

我尝试卸载auto-py-to-exe并重新安装它,但此错误msg不断出现。我还尝试了其他软件包,同样的事情发生。

在安装失败后尝试运行auto-py-to-exe会显示错误:

raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'gevent' distribution was not found and is required by gevent-websocket

pip install gevent也像以前一样失败

感谢您的帮助

(我在Windows 10上,运行pip版本18.0的python 3.7)

1 个答案:

答案 0 :(得分:0)

尝试以管理员权限运行命令并将位置更改为/c,然后安装“ auto-py-to-exe ”,或使用{{1}更新您的点},以确保您使用最新版本的安装程序。