How to Fix the “python egg_info failed with error code 1” Error

Python allows its users to install various packages that work with Python. For the installation of these tools using the command line, the “pip” tool should be on the system. The “pip” command allows the user to easily install Python-related packages on your system with just one or two commands. While attempting to install these various packages using the “pip” command, a familiar problem may be encountered with the statement “python egg_info failed with error code 1”.

This article will elaborate on the reasoning behind this error and help you implement the solution for this issue on your system.

How to Fix the “python egg_info failed with error code 1” Error?

There exist various reasons that will invoke this issue on your system. This section will list down all the possible causes behind this error and also provide their corresponding solutions. The error statement is demonstrated below as we run the following command in the terminal:

$ pip install unroll

Reason 1: Setup Tools and Module Not Installed

The first problem that can cause this issue is that the “setup tools” and “ez_setup” Module for Python are not installed. When this happens, the “pip” installer will not be able to install certain packages as a result.

Solution: Install Setup Tools and Module

The best solution for this problem is to install the “setup tools” and “ez_setup” modules that are currently missing from your system. To achieve this, run the commands below in the terminal:

$ sudo apt-get install python-setuptools
$ pip install ez_setup

Reason 2: Setup Tools Not Up to Date

Sometimes, this error can be invoked if the setup tools for Python are not the latest version. Due to an older version of “setup tools”, the newer packages may not be installed.

Solution: Upgrade the Setup Tools

To upgrade the setup tools, we use the pip installer, which is achieved using the command below:

$ pip install --upgrade setuptools

Reason 3: The pip is Not Upgrade

It is possible that your pip installer is not the latest version and needs an upgrade. Due to this, the pip will not be able to install some newer software and will prompt the “python egg_info failed with error code 1” issue.

Solution: Upgrade pip

The best method to resolve this issue is to upgrade your pip installer, which can be done by executing a command as shown below:

$ pip install --upgrade pip

These solutions will fix your error and help you install any pip package that you desire.

That’s it from this guide!


The “python egg_info failed with error code 1” problem can occur when the “setup tools” or “ez_setup” module are not installed on the system. Other reasons for this error include the pip installer or the setup tools not being updated on their latest version. This problem can be solved by installing the “setup tools” and “ez_setup” modules on the user system. It can also be fixed by upgrading the pip installer on your system alongside the setup tools. This post has given a demonstration of all of these reasons and their respective solutions.