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

但pip安装展开给我

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

我怎么解决这个问题?


当前回答

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位

其他回答

下面的命令对我很有用

[root@sandbox ~]# pip install google-api-python-client==1.6.4

其他方式:

sudo apt-get install python-psycopg2 python-mysqldb

我也有同样的问题。

问题是:

Pyparsing 2.2已经安装,我的requirements.txt正在尝试安装Pyparsing 2.0.1,这会抛出这个错误

上下文:我正在使用virtualenv,似乎2.2来自我的全局操作系统Python site-packages,但即使有——no-site-packages标志(现在默认为last virtualenv) 2.2仍然存在。当然,因为我从他们的网站上安装了Python,它将Python库添加到我的$PATH中。

也许pip install—ignore-installed会起作用。

解决方案:当我需要继续前进时,我只是从requirements.txt中删除了pyparsing==2.0.1。

升级python版本对我来说很有用。

我有同样的问题,并能够通过执行以下操作来解决。

Windows Python需要通过SDK安装Visual c++库来构建代码,例如通过setuptools.extension.Extension或numpy.distutils.core.Extension。例如,在Windows中使用Python构建f2py模块需要上面安装的Visual c++ SDK。在Linux和Mac上,c++库与编译器一起安装。

https://www.scivision.co/python-windows-visual-c++-14-required/