Bobcares

Setup.py egg_info failed with error code 1 | Resolved

by | Dec 16, 2022

Wondering how to resolve setup.py egg_info failed with error code 1 ? Our server management services team is here to lend a hand with your queries and issues.

How to fix Setup.py egg_info failed with error code 1?

If you have been running into the following error, you have come to the right place:

Setup.py egg_info failed with error code 1

Our Support Engineers have put together the following solutions to help you out.

  1. Check if Pip and Setuptools Are Installed Correctly
  2. Upgrade Pip
  3. Upgrade Setuptools
  4. Install ez_setup

 

Method 1: Check if Pip and Setuptools Are Installed Correctly

PIP and Setuptools are python package managers.

They help you add external libraries, packages, and already written code in your python program.

If missing or installed incorrectly, these tools can cause the command to fail with error code 1.

Therefore, you need to check if both PIP and Setuptools are installed correctly in your system.

Follow the below steps to check if PIP and Setuptools are installed correctly on your computer:

  1. First, open Command Line Interface (CMD) on the computer. You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.
  2. Then, enter this command:

    pip list

    Running pip list will let you know if you have pip and setuptools installed and their version numbers.

Once you see both pip and setuptools installed from the pip list command, you must compare the version numbers.

Make sure that both have their latest version installed on your computer. If the version is old, we have to upgrade both pip and setuptools.

Method 2. Upgrade Pip 

The previous method showed you how to check if PIP is installed on your computer.

Furthermore, if you have PIP installed but with an older version, then there is a high chance that you are facing the command “python setup.py egg_info” failing with error code 1.

Therefore, you need to upgrade the PIP on your computer.

You can easily upgrade PIP on your computer and fix the command “python setup.py egg_info,” which failed with error code 1, by following the below steps.

  1. First, open Command Line Interface (CMD) on your computer.
  2. In CMD, type python -m pip install -U pip.

    Running the command will upgrade the PIP package installed on your computer.

After PIP is upgraded, you can go ahead and install python packages without facing the command “python setup.py egg_info” failed with error code 1 issue.

Method 3: Upgrade Setuptools to Fix “Python Setup.py egg_info”

Setuptools package manager needs similar care as the pip python package manager.

If you found from method 1 in this article that you are running an old version of Setuptools, you need to update it to get rid of the command “python setup.py egg_info,” which failed with error code 1.

Follow the below steps to upgrade Setuptools on your computer.

  1. To begin with, open Command Line Interface (CMD) on your computer.
  2. In CMD, type pip install -upgrade setuptools.

    After running the above command, your system will upgrade the Setuptools package.

You can now install other packages without facing the command “python setup.py egg_info,” which failed with the error code 1 issue.

Method 4: Install the ez_setup

One major cause of the error is the missing ez_setup module in your computer.

Using pip package manager, you can easily install the ez_setup.

Follow the below steps to install the ez_setup on your computer using the pip package manager of python.

  1. Open Command Line Interface (CMD) on your computer.
  2. In CMD, type the command pip install ez_setup

    After that, the ez_setup module will work on your computer.

Next, try to install new python packages, and hopefully, you won’t face the issue.

 

Conclusion

To wrap up, our Support Engineers demonstrated a quick fix for resolving the setup.py egg_info failed with error code 1. We also learned about the root cause behind this specific error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

5 Comments

  1. Venkat

    Hello, I’m getting this error when trying to build a Docker image on Linux OS. I tried above steps in dockerfile ut still get the same error.
    Complete output from command python setup.py egg_info:
    #19 19.69 Traceback (most recent call last):
    #19 19.69 File “”, line 1, in
    #19 19.69 File “/tmp/pip-build-BdlTEJ/pandas/setup.py”, line 250
    #19 19.69 f”{extension}-source file ‘{sourcefile}’ not found.\n”
    #19 19.69 ^
    #19 19.69 SyntaxError: invalid syntax
    #19 19.69
    #19 19.69 —————————————-
    #19 19.88 Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-BdlTEJ/pandas/
    #19 20.65 You are using pip version 8.1.2, however version 22.3.1 is available.
    #19 20.65 You should consider upgrading via the ‘pip install –upgrade pip’ command.

    Any suggestions

    Reply
    • Hiba Razak

      Hi ,
      Our experts can help you with the issue.Please contact our support team via live chat(click on the icon at right-bottom).

      Reply
      • Muhammad Saeed

        Hi,
        Really need help. My system gives me a stack of urls while install unroll. Like “pip install unroll”. Please help me.

        Reply
      • Muhammad Saeed

        Hi, I need help. I am installing unroll using commond “pip install unroll”. But it gives me a stack of urls errors given below. I have updated everything but It doesn’t work.

        C:\Windows\System32>pip install unroll
        Collecting unroll
        Using cached unroll-0.1.0.tar.gz (7.3 kB)
        Preparing metadata (setup.py) … error
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [32 lines of output]
        Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
        Traceback (most recent call last):
        File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 143, in use_setuptools
        raise ImportError
        ImportError

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
        File “”, line 2, in
        File “”, line 34, in
        File “C:\Users\Developer\AppData\Local\Temp\pip-install-pizv754q\unroll_dcbce8047706455a8010751864565182\setup.py”, line 2, in
        ez_setup.use_setuptools()
        File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
        File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 123, in _do_download
        tarball = download_setuptools(version, download_base,
        File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 193, in download_setuptools
        src = urlopen(url)
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 216, in urlopen
        return opener.open(url, data, timeout)
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 525, in open
        response = meth(req, response)
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 634, in http_response
        response = self.parent.error(
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 563, in error
        return self._call_chain(*args)
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 496, in _call_chain
        result = func(*args)
        File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 643, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
        urllib.error.HTTPError: HTTP Error 403: SSL is required
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        error: metadata-generation-failed

        × Encountered error while generating package metadata.
        ╰─> See above for output.

        note: This is an issue with the package mentioned above, not pip.
        hint: See above for details.

        Reply
        • Hiba Razak

          Hi Muhammad,
          Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).

          Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.