Solve – “pip install unroll”: “python setup.py egg_info” failed with error code 1 In Python

“pip install unroll”: “python setup.py egg_info” failed with error code 1 is a popular Python error which occurs when pip is not upgraded but not only for that reason.

In this article I am going to detail the root of this error and how to solve it, I am also going to present other solutions which worked for other developers.

Describing : “pip install unroll”: “python setup.py egg_info” failed with error code 1 In Python

This error is straight-forward and occurs when you try to install packages with pip.

For example we can try to install the unroll package with pip using the command bellow.

                                                                       #
pip install unroll
                                                                       #

This is the error we get

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

Solution 1 : upgrade pip before you install the package

The first solution is to simply upgrade pip, you can do that with the command bellow

                                                                       #
python -m pip install --upgrade pip
                                                                       #

Then try installing the package again, for example you can run this command

                                                                       #
pip install unroll
                                                                       #

Solution 2 : install setuptools before installing the package

First, let us start by installing setuptools.

If setuptools is installed, try upgrading it with –upgrade exactly like in the code bellow

                                                                       #
pip install --upgrade setuptools
                                                                       #

Now let us try installing the package again

                                                                       #
pip install unroll
                                                                       #

If the above does not work, let us check if the module ez_setup is installed, if you can not find it, just go ahead and try installing it with pip

                                                                       #
pip install ez_setup
                                                                       #

Now we should be able to install the package running the command

                                                                       #
pip install unroll
                                                                       #

This solution should work for you, if it does not work, you can try the possible solutions bellow.

I hope this article has been helpful so far, consider helping us by donating to our Kofi account, there is a red button at the top of this page, this is not an obligation. Thanks.

Solution 3 : use sudo for “install python-dev libpq-dev “

The error can also appear when you skip some steps while installing Python and other related packages.

You can run the command bellow to solve the problem

                                                                       #
sudo apt-get install python-dev libpq-dev
                                                                       #

Now go to your virtual env and install the package with pip.

Solution 4 : use pip install in the command prompt ( pip install in CMD )

Sometimes, this is a permissions problem, the solution in this case is to :

Run the command prompt as administrator

Then run pip in order to install your chosen package, just like in the line bellow

                                                                       #
pip install unroll
                                                                       #

I hope this solution has worked for you as this is the last solution in our article. Good luck.

Summing-up

This is the end of our post, I hope this has been helpful and helped you solve the error or at least pointed you in the right direction, Learning Python is a fun journey, keep coding and cheers.

If you want to learn more about Python, please check out the Python Documentation : https://docs.python.org/3/