Python pip install fails: invalid command egg_info
Install distribute, which comes with egg_info
.
Should be as simple as pip install Distribute
.
Distribute has been merged into Setuptools as of version 0.7. If you are using a version <=0.6, upgrade using pip install --upgrade setuptools
or easy_install -U setuptools
.
pip fails to install anything, error: invalid command 'egg_info'
Try pip install --upgrade setuptools
or easy_install -U setuptools
or
Download this file and execute python ez_setup.py
Can't install via pip because of egg_info error
Found out what was wrong. I never installed the setuptools for python, so it was missing some vital files, like the egg ones.
If you find yourself having my issue above, download this file and then in powershell or command prompt, navigate to ez_setup’s directory and execute the command and this will run the file for you:
$ [sudo] python ez_setup.py
If you still need to install pip at this point, run:
$ [sudo] easy_install pip
easy_install was part of the setuptools, and therefore wouldn't work for installing pip.
Then, pip will successfully install django with the command:
$ [sudo] pip install django
Hope I saved someone the headache I gave myself!
~Zorpix
pip installation error command 'python setup.py egg_info' failed with error code 1
With pip install
, the real error is always hidden a little further up the log because pip runs the install routine of your packages.
In your case check for ERROR: Traceback
, which says 'retype requires Python 3.6+'.
So, the installed package requires Python 3.6 but from an earlier error message we can deduce your pip runs python 2.7 (look for DEPRECATION: Python 2.7
)
So, fix the error by running the command with pip3
or python3 pip
.
To verify which version of python is used, call pip -V
.
Related Topics
How to Remove a Pandas Dataframe from Another Dataframe
Swapping Columns in a Numpy Array
How to Avoid Last Comma in Python Loop
Change a Colour of a Pixel in Python
How to Format an Integer to a Two Digit Hex
Is There an Easy Way in Python to Wait Until Certain Condition Is True
Why Is This Python Script With Matplotlib So Slow
How to Print the Even-Indexed and Odd-Indexed Characters of Strings
Dice Rolling Simulator in Python
Python/Pandas: How to Match List of Strings With a Dataframe Column
How to Update Sqlalchemy Orm Object by a Python Dict
Converting Exponential to Float
Cv2 Image Error: Error: (-215:Assertion Failed) !Ssize.Empty() in Function 'Cv::Resize'
Python List - Only Keep Only-Positive or Only-Negative Values
How to Convert a Datetime Object to Milliseconds Since Epoch (Unix Time) in Python