Easy_install and Pip doesn't work

前端 未结 6 841
臣服心动
臣服心动 2020-12-15 06:39

Easy_install and Pip doesn\'t work anymore on python 2.7, when I try to do:

sudo easy_install pip

I get:

Traceback (most re         


        
相关标签:
6条回答
  • 2020-12-15 07:16

    If you installed a new version of easy_install through Distribute, the new command may have been installed in another directory, most likely /usr/local/bin/. But the traceback shows you were using /usr/bin/easy_install. Try this:

    sudo /usr/local/bin/easy_install ...
    
    0 讨论(0)
  • 2020-12-15 07:18

    I was trying to get pip to work on the 2.7.0 version, but it seems like it doesn't come with the easy_install/pip files (Script folder in main directory), installing 2.7.13 solved the problem for me.

    0 讨论(0)
  • 2020-12-15 07:19

    I had this issue where python's distribute package wasn't installed for some reason. After following the instructions on python-distribute, i got it working.

    install the distribute package as follows:

    $ wget https://web.archive.org/web/20100225231201/http://python-distribute.org/distribute_setup.py
    $ python distribute_setup.py
    

    EDIT: http://python-distribute.org/distribute_setup.py no longer works:

    hopefully this will resolve your problem with running

    $ sudo easy_install
    

    Happy Coding!

    0 讨论(0)
  • 2020-12-15 07:37

    I had a similar problem, but things were working fine as root. In my case, I found that the permissions on the python packages were not readable by the ID I was running the command under.

    To correct it, I ran the following command to open the permission for read and execute to all users:

    sudo chmod o+rx -R /usr/local/lib/python2.7/dist-packages/*.egg
    
    0 讨论(0)
  • 2020-12-15 07:40

    Try

      sudo easy_install Distribute 
    

    and if that exists, but is too old

      sudo easy_install -U Distribute
    

    Looks like either Distribute/setuptools (it's old name) is messed up or Python package settings. If either of these do not help, try removing the full Python 2.7 installation and reinstall everything from the scratch.

    Possible reasons for the mess is that you have used both sudo easy_install / sudo pip and Linux distribution packages to mix and match system-wide installation packages. You should use virtualenv instead if you use pip/easy_install (no sudo needed)

    http://pypi.python.org/pypi/virtualenv

    0 讨论(0)
  • 2020-12-15 07:40

    I had similar issue when trying to install package via pip with python 3.6 on windows. (pip is supposed to work out of the box with this install)

    The problem was not running as administrator.

    Running cmd as administrator and then installing my package worked:

    python -m pip install pylint

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