When trying to install some packages with pip, a lot of users receive the “command "python setup.py egg_info" failed with error code 1” message. Fortunately, MiniTool summarizes several proven solutions to the error. Let’s start trying.
What causes the python setup.py egg_info failed with error code 1? According to user reports, the error often occurs when your pip or setuptools is outdated or installed improperly. If the ez_setup module is missing from your computer, you may also receive the pip install failed with error code 1. Here we provide 4 applicable ways to fix it. You can try them in order until the error gets resolved.
I'm new to Python and have been trying to install some packages with pip. But pip install unroll gives me: Command "python setup.py egg_info" failed with error code 1 in C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-wa7uco0k\unroll\. How can I solve this?https://stackoverflow.com/questions/35991403/pip-install-unroll-python-setup-py-egg-info-failed-with-error-code-1
Fix 1. Check Your Pip and Setuptools Installed Version
First of all, you should check if the pip and setuptools have been installed on your computer. It will show you the current version numbers of them. Once you find your pip or setuptools version is outdated, you can continue the following solutions to update them.
Here’s how to check the pip and setuptools installed version.
Step 1. Type cmd in the search box on the taskbar. And then right-click the Command Prompt app and select Run as administrator.
Step 2. In the elevated Command Prompt window, type the pip list command and hit Enter. Now, you can see the pip and setuptools version numbers are the lasted versions. If not, you can proceed with the following fixes to update them.
Fix 2. Upgrade the Setuptools
If you have already installed the setuptools, you can follow the steps below to update it to the latest version.
Step 1. Open the elevated Command Prompt just like Step 1 in the above fix.
Step 2. Type the following command and hit Enter to update the setuptools.
pip install –upgrade setuptools
Once updated successfully, you can try installing the package again and see if the command "python setup.py egg_info" failed with error code 1 still appears.
This post offers 2 ways to fix the error "ImportError: Dll Load Failed: The specified module could not be found."
Fix 3. Upgrade Pip
The command python setup.py egg_info failed with error code 1 can also be caused by the pip itself. If you are using an old version of pip, we recommend you update it to the latest version. To do so, you just need to run python -m pip install -U pip in the elevated Command Prompt.
Fix 4. Install the ez_setup Module
Sometimes the command python setup.py egg_info failed with error code 1 just occurs because the ez_setup module is missing from your system. In this case, installing ez_setup can help you fix the error.
Step 1. Open the elevated Command Prompt window again, and then type pip install ez_setup in it and hit Enter.
Step 2. If not working, try running the pip install unroll command.
Step 3. If it’s still not working, it’s possible that your pip didn’t install/upgrade properly. To fix it, try running the easy_install -U setuptools command. And run pip install unroll again.
After you installed ez_setup module successfully, try installing the package and see if the pip error code 1 gets fixed.