txt - pipenv pip.exceptions.installationerror: command "python setup.py egg_info" failed with error code 1

“pip install unroll”: “python setup.py egg_info” failed with error code 1 (16)

Following below command worked for me

[[email protected] ~]# pip install google-api-python-client==1.6.4

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?

Had the same problem on my Win10 PC with different packages and tried everything mentioned so far.

Finally solved it by disabling Comodo Auto-Containment .

Since nobody has mentioned it yet, I hope it helps someone.

I downloaded the .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and then did:

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

Note that the version you need to use (win32/win_amd-64) depends on the version of Python and not that of Windows.

I faced the same problem with the same error message but on Ubuntu 16.04 LTS (Xenial Xerus) instead:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-w71uo1rg/poster/

I tested all the solutions provided above and none of them worked for me. I read the full TraceBack and found out I had to create the virtual environment with Python version 2.7 instead (the default one uses Python 3.5 instead):

virtualenv --python=/usr/bin/python2.7 my_venv

Once I activated it, I run pip install unirest successfully.

I got this same error while installing mitmproxy using pip3 . The below command fixed this:

pip3 install --upgrade setuptools

I had the same issue when installing the "Twisted" library and solved it by running the following command on Ubuntu 16.04 (Xenial Xerus):

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

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 .

I solved it on Centos 7 by using:

sudo yum install libcurl-devel

I tried all of the above with no success. I then updated my Python version from 2.7.10 to 2.7.13, and it resolved the problems that I was experiencing.

Other way:

sudo apt-get install python-psycopg2 python-mysqldb

That means some packages in pip are old or not correctly installed.

  1. Try checking version and then upgrading pip.Use auto remove if that works.

  2. If the pip command shows an error all the time for any command or it freezes, etc.

  3. The best solution is to uninstall it or remove it completely.

  4. Install a fresh pip and then update and upgrade your system.

  5. I have given a solution to installing pip fresh here - python: can't open file get-pip.py error 2] no such file or directory

This worked for me:

sudo xcodebuild -license

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

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

  • 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