我正在尝试用pip安装一些软件包。

但pip安装展开给我

命令“python setup.py egg_info”失败,错误码为1 C:\Users\马可的~ 1 \ AppData \ \ Temp \ pip-build-wa7uco0k \展开\

我怎么解决这个问题?


当前回答

——升级setuptools 警告:pip正在被一个旧的脚本包装器调用。这将在pip的未来版本中失败。 请参阅https://github.com/pypa/pip/issues/5599获取解决潜在问题的建议。

******为了避免这个问题,你可以用'-m pip'来调用Python,而不是直接运行pip .******

使用python3 -m PIP "command" 例如:python3 -m PIP install——user pyqt5

其他回答

其他方式:

sudo apt-get install python-psycopg2 python-mysqldb

我从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载了.whl文件,然后做了:

pip install scipy-0.19.1-cp27-cp27m-win32.whl

注意,您需要使用的版本(win32/win_amd-64)取决于Python的版本,而不是Windows的版本。

Download and install the Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-in/download/details.aspx?id=44266 - this package contains the compiler and set of system headers necessary for producing binary wheels for Python 2.7 packages. Open a command prompt in elevated mode (run as administrator) Firstly do pip install ez_setup Then do pip install unroll (It will start installing numpy, music21, decorator, imageio, tqdm, moviepy, unroll) # Please be patient for music21 installation

Python 2.7.11使用64位

我在安装“Twisted”库时也遇到了同样的问题,在Ubuntu 16.04 (Xenial Xerus)上运行以下命令解决了这个问题:

sudo apt-get install python-setuptools python-dev build-essential

在尝试用pip安装Python模块时,我遇到了相同的错误代码。 @Hackndo注意到文档表明存在安全问题。

基于这个答案,我的问题通过运行带有sudo前缀的pip install命令来解决:

sudo pip install python-mpd2