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.
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:
- Open the Command Prompt by searching it through the Windows search feature.
- Type the following command to get the list of installed packages.
pip list
- 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.
- Open the Command Prompt by searching it through the Windows search feature.
- 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.
- 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:
- Press the Windows + S key to open the Windows search feature. Now search for the Command Prompt and open it.
- To update the pip, try the following command:
python -m pip install -U pip
- 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:
- 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.
- Type the following command to install the ez_setup:
pip install ez_setup
- 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.