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

但pip安装展开给我

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

我怎么解决这个问题?


当前回答

其他方式:

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位

我在Centos 7上使用:

sudo yum install libcurl-devel

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

升级pip后解决:

python -m pip install --upgrade pip
pip install "package-name"

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

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