“pip install unroll”: “python setup.py egg_info” f

2018-12-31 03:33发布

I'm new to Python and have been trying to install some packages with pip.

But pip install unroll gives me

Command "python setup.py egg_info" failed with error code 1 in C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-wa7uco0k\unroll\

How can I solve this?

21条回答
浅入江南
2楼-- · 2018-12-31 04:10

I got stuck exactly with the same error with psycopg2. It looks like I skipped a few steps while installing Python and related packages.

  1. sudo apt-get install python-dev libpq-dev
  2. Go to your virtual env
  3. pip install psycopg2

(In your case you need to replace psycopg2 with the package you have an issue with.)

It worked seamlessly.

查看更多
不流泪的眼
3楼-- · 2018-12-31 04:14
  • 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 bit used

查看更多
情到深处是孤独
4楼-- · 2018-12-31 04:14

I had the same problem.

The problem was:

pyparsing 2.2 was already installed and my requirements.txt was trying to install pyparsing 2.0.1 which throw this error

Context: I was using virtualenv, and it seems the 2.2 came from my global OS Python site-packages, but even with --no-site-packages flag (now by default in last virtualenv) the 2.2 was still present. Surely because I installed Python from their website and it added Python libraries to my $PATH.

Maybe a pip install --ignore-installed would have worked.

Solution: as I needed to move forwards, I just removed the pyparsing==2.0.1 from my requirements.txt.

查看更多
一个人的天荒地老
5楼-- · 2018-12-31 04:16

Upgrading Python to version 3 fixed my problem. Nothing else did.

查看更多
爱死公子算了
6楼-- · 2018-12-31 04:17

About the error code

According to the Python documentation:

This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from linux/include/errno.h, which should be pretty all-inclusive.

Error code 1 is defined in errno.h and means Operation not permitted.

About your error

Your setuptools do not appear to be installed. Just follow the Installation Instructions from the PyPI website.

If it's already installed, try

pip install --upgrade setuptools

If it's already up to date, check that the module ez_setup is not missing. If it is, then

pip install ez_setup

Then try again

pip install unroll

If it's still not working, maybe pip didn't install/upgrade setup_tools properly so you might want to try

easy_install -U setuptools

And again

pip install unroll
查看更多
妖精总统
7楼-- · 2018-12-31 04:19

This was the easier way for me:

pip2 install Name

So if you was using pip, try to use pip3 or pip2

It should solve the problem.

查看更多
登录 后发表回答