Can't install via pip because of egg_info error

后端 未结 10 1182
-上瘾入骨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: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

提交回复
热议问题