"pip install unroll": "python setup.py egg_info" failed with error code 1

Viewed 934257

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?

30 Answers

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

pip3 install --upgrade setuptools

First try:

pip install unroll

For sure not work :)

Then Try:

pip2 install unroll

Still get error Try:

pip3 install unroll

If pip3 Worked then suggest to change configuration to use pip3 as pip because you will get a lot of issues as the modern now is Python3 = pip3 if you execute a script files.

It's a dependency issue.

I tried running the following commands helped me sorting out the dependencies, in my case the dependency was

grpcio

pip3 install --upgrade pip

python3 -m pip install --upgrade setuptools

pip3 install --no-cache-dir  --force-reinstall -Iv grpcio==1.36.1

pip3 install pulsar-client==2.7.0

remember you must have python3 installed in your system.

For me this worked

python3 -m pip3 install -U pip

you can also try

python -m pip install -U pip

pip3 install --upgrade setuptools WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.

******To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.******

use python3 -m pip "command" eg: python3 -m pip install --user pyqt5

next installation helps me:

pip3 install cython

This worked for me:

sudo xcodebuild -license

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 had the same problem and was able to fix by doing the following.

Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools.extension.Extension or numpy.distutils.core.Extension. For example, building f2py modules in Windows with Python requires Visual C++ SDK as installed above. On Linux and Mac, the C++ libraries are installed with the compiler.

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

try on linux:

sudo apt install python-pip python-bluez libbluetooth-dev libboost-python-dev libboost-thread-dev libglib2.0-dev bluez bluez-hcidump

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.

Following below command worked for me

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

Methods to solve setup.pu egg_info issue when updating setuptools or not other methods doesnot works.

  1. If CONDA version of the library is available to install use conda instead of pip.
  2. Clone the library repo and then try installation by pip install -e . or by python setup.py install

upgrading python's version did the work for me.

I have just encountered the same problem when trying to pip install -e . a new repo. I did not notice that the contents of setup.py haven't been saved properly and I was effectively running the command with an empty setup.py.

Hence you may experience the same error message if the setup.py of the target package is either empty or malformed.

I solved it on Centos 7 by using:

sudo yum install libcurl-devel
Related