pip已经安装,但是/usr/bin/pip: No such file or directory

解决方法

1.which pip 
/usr/local/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.

pip在usr/local/bin/pip    

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

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

猜你喜欢

转载自blog.csdn.net/qq_15505637/article/details/81094162