在linux服务器上,升级了pip,升级成功后出现/usr/bin/pip: No such file or directory

 

1.which pip 
/usr/bin/pip
 
2.pip 
-su: /usr/bin/pip: No such file or directory
 
3.type pip 
pip is hashed (/usr/bin/pip) 
So pip is definintely in /usr/local/bin/pip but it is been cached as in /usr/bin/pip, thanks to the Stackoverflow question, the solution is very simple:
 
4.hash -r 
When the cache is clear, pip is working again.

linux pip已经安装,提示/usr/bin/pip: No such file or directory_python

pip在usr/bin/pip    

如果机器上已经有之前的pip,要先卸载

sudo apt-get remove python-pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
hash -r