The 'pip==7.1.0' distribution was not found and is required by the application

前端 未结 10 1039
故里飘歌
故里飘歌 2020-12-02 20:15

I have the latest version of pip 8.1.1 on my ubuntu 16. But I am not able to install any modules via pip as I get this error all the time.

File \"/usr/local/         


        
相关标签:
10条回答
  • 2020-12-02 20:37

    if you have 2 versions of pip for example /usr/lib/pip and /usr/local/lib/pip belongs to python 2.6 and 2.7. you can delete the /usr/lib/pip and make a link pip=>/usr/local/lib/pip.

    0 讨论(0)
  • 2020-12-02 20:38

    A bit late but if easy_install doesn't solve the issue, this worked fine for me:

    $ vim /usr/local/bin/pip
    

    Then run:

    :%s/7\.1\.0/8\.1\.1/g
    :wq
    
    0 讨论(0)
  • 2020-12-02 20:45

    After a large upgrade in Mint -> 19, my system was a bit weird and I came across this problem too.

    I checked the answer from @amangpt777 that may be the one to try

    /usr/local/bin/pip # -> actually had a shebang calling python3
    
    ~/.local/bin/pip* # files were duplicated with the "sudo installed" /usr/local/bin/pip*
    

    Running

    sudo python get-pip.py # with script https://bootstrap.pypa.io/get-pip.py
    sudo -H pip install setuptools
    

    seem to solve the problem. I understand this as a problem with the root / user installation of python. Not sure if ananconda3 is also messing around with those scrips.

    0 讨论(0)
  • 2020-12-02 20:47

    Just relink to resolve it. Find which python : ls -l /usr/local/bin/python

    ln -sf /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/pip /usr/local/bin/pip
    

    Or reinstall pip: https://pip.pypa.io/en/stable/installing/

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