Fix: ‘Command “python setup.py egg_info” failed with error code 1’ When Installing Python

The error code 1 is defined as Operation not permitted in python standard errno system symbols. This issue is mostly caused when your setuptools do not appear to be installed or updated. In this article, we have provided the methods that solved the issue for most users regarding this particular error.

Error code 1 in python

Check if your pip and setuptools are Installed Correctly

Before updating you should check if the pip and setuptools are installed on your system. It also shows the version numbers for both. You can find out if your pip or setuptools version is out of date due to which you are having the error issue. Follow the below steps to check the installed versions:

  1. Open the Command Prompt by searching it through the Windows search feature.
  2. Type the following command to get the list of installed packages.
    pip list
    Checking installed packages
  3. If the setuptools is available in the packages list, it means it is already installed on your system. You can check the version and compare it with the latest version.

Upgrade setuptools

If the setuptools is already installed, then try updating it to the newest version. You can try the following steps to update your setuptools.

  1. Open the Command Prompt by searching it through the Windows search feature.
  2. Now type the following command to update the setuptools:
    pip install –upgrade setuptools

    Note: If you are on Terminal, make sure to add the “sudo” before the command.

  3. It will give an output of successfully installed. Now you can try using the command that gave the error in the first place.

Upgrade pip

Sometimes the issue resides in the pip itself. You can upgrade pip to fix the issue. You can follow the below steps to upgrade pip:

  1. Press the Windows + S key to open the Windows search feature. Now search for the Command Prompt and open it.
  2. To update the pip, try the following command:
    python -m pip install -U pip
    Upgrading pip
  3. Now you can try installing your package with the pip command.

Try to Install the ez_setup

Some users got their issues fixed by installing the ez_setup module. Sometimes the module missing from your system can cause the issue. Installing it resolved the issue for many users. Follow the below steps:

  1. Hold the Windows key and press R to open the Run dialog box. Now type CMD in it and press the Enter key to open Command Prompt.
  2. Type the following command to install the ez_setup:
    pip install ez_setup
    Installing ez_setup
  3. It will return the successfully installed message with the version name. You can now try using the package install command and see if it works.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.