Can't install via pip because of egg_info error

后端 未结 10 1005
-上瘾入骨i
-上瘾入骨i 2020-11-22 13:58

No matter which package I\'m trying to install, I get this error:

error: invalid command \'egg_info\'

----------------------------------------
Cleaning up.         


        
相关标签:
10条回答
  • 2020-11-22 14:27

    In my case this error message appeared because the package I was trying to install (storm) was not supported for Python 3.

    0 讨论(0)
  • 2020-11-22 14:28

    Having the same error trying to install matplotlib for Python 3, those solutions didn't work for me. It was just a matter of dependencies, though it wasn't clear in the error message.

    I used sudo apt-get build-dep python3-matplotlib then sudo pip3 install matplotlib and it worked.

    Hope it'll help !

    0 讨论(0)
  • 2020-11-22 14:31

    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

    0 讨论(0)
  • 2020-11-22 14:34

    virtualenv is a tool to create isolated Python environments.

    you will need to add the following to fix command python setup.py egg_info failed with error code 1, so inside your requirements.txt add this:

    virtualenv==12.0.7

    0 讨论(0)
  • 2020-11-22 14:35

    Try these: pip install --upgrade setuptools or easy_install -U setuptools

    0 讨论(0)
  • 2020-11-22 14:38

    See this : What Python version can I use with Django?¶ https://docs.djangoproject.com/en/2.0/faq/install/

    if you are using python27 you must to set django version :

    try: $pip install django==1.9

    0 讨论(0)
提交回复
热议问题