If you are trying to install a Python package and are seeing the error message Command python setup.py egg_info failed with error code 1, don’t worry – you’re not alone! This can be a frustrating error to encounter, but fortunately, there is a solution.
In this blog post, we will walk you through the steps to resolving this issue.
What Causes Command “python setup.py egg_info” failed with error code 1?
When you’re trying to install a Python package, you may encounter the command “python setup.py egg_info” failing with error code 1. This error message indicates an issue with the Python installation on your computer.
Follow the methods below to resolve this issue.
Method 1: Check if Python is Installed
Python may be missing from your system. Check if Python is installed by running the following command:
C:\Windows\System32>python -V
'python' is not recognized as an internal or external command,
operable program or batch file.
If you get the error above, it means Python is not installed on your computer.
Follow the steps below to install Python:
- Download Python from python.org.
- Once downloaded, run the executable file.
- Proceed with the steps to install Python.
- After the installation has been completed, run the above command again.
Method 2: Check if PIP is Installed
Although Python may be installed, PIP may not have gotten installed. PIP is a package management system written in Python. It’s used to install and manage software packages. Check if PIP is installed by running the following command:
If you don’t get the output above, it means PIP isn’t installed on your computer. Follow the steps below to install PIP on Windows:
- At the Windows search bar, type cmd.
- When the Command Prompt window appears, click Run as administrator.
- At the Command Prompt window, download the get-pip.py file by running the following command:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
To install PIP, type:
python get-pip.py
Once installed, you should upgrade to the latest version by running the command:
pip install --upgrade pip
Once pip has been installed, you can verify if it’s working by listing all the installed packages.
pip list
Method 3: Check if Setuptools is Installed
Setuptools is a collection of enhancements to the Python distribution that allows developers to build and distribute Python packages.
You may encounter the command “python setup.py egg_info” failing with error code 1 if the setuptools are not installed or outdated.
Upgrade setuptools by running the following command:
pip install --upgrade setuptools
Conclusion
Hopefully one of these solutions will fix your issue. If not, please feel free to reach out to us for help. We’re here to help!
Hi, i tried everything i could but i didnt found the solution for this very similar error, can somebody to help me ?
—the code —–
C:\Users\…\anaconda3\envs\…>python –version
Python 3.8.10
C:\Users\…\anaconda3\envs\…>pip3 install -r requirements.txt
Collecting colorama==0.4.4
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting Cython==0.29.21
Using cached Cython-0.29.21-cp38-cp38-win_amd64.whl (1.7 MB)
Collecting progress==1.5
Using cached progress-1.5.tar.gz (5.8 kB)
Preparing metadata (setup.py) … ERROR: Error [WinError 2] Le fichier spécifié est introuvable while executing command python setup.py egg_info
error
ERROR: Could not install packages due to an OSError: [WinError 2] Le fichier spécifié est introuvable
ps: the part in french means :”The specified file is unfoundable while …”
Hey Bgl,
Thanks for your question. Some files may be missing from your computer. I recommend that you follow Methods 2 and 3 to install PIP and Setuptools, respectively.