Total Pageviews

Monday, 25 July 2016

升级pip的命令

pip install --upgrade pip
显示:
...
Installing pip script to /usr/local/bin
    Installing pip2.7 script to /usr/local/bin
    Installing pip2 script to /usr/local/bin
Successfully installed pip
Cleaning up...
root@AR:~# pip --version
-bash: /usr/bin/pip: 没有那个文件或目录
root@AR:~# ln -s /usr/local/bin/pip /usr/bin/pip
ln: 无法创建符号链接"/usr/bin/pip": 文件已存在
root@AR:~# /usr/bin/pip --version
-bash: /usr/bin/pip: 没有那个文件或目录
root@AR:~# rm -rf /usr/bin/pip
root@AR:~# pip --version
-bash: /usr/bin/pip: 没有那个文件或目录
root@AR:~# ln -s /usr/local/bin/pip /usr/bin/pip
root@AR:~# pip --version
pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
root@AR:~# 
 
有时用pip安装某些python程序时,遇错。升级后即可解决问题。