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

但pip安装展开给我

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

我怎么解决这个问题?


当前回答

对我来说这很有效

python3 -m pip3 install -U pip

你也可以试试

python -m pip install -U pip

其他回答

其他方式:

sudo apt-get install python-psycopg2 python-mysqldb

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位

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

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

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

我在使用pip3安装mitmproxy时遇到了同样的错误。下面的命令修复了这个问题:

pip3 install --upgrade setuptools

将Python升级到版本3解决了我的问题。其他的都没用。