pip升级之后出现:/usr/bin/pip: No such file or directory

这是因为缓存的问题造成的,解决方案:

1.which pip 
/usr/local/bin/pip

2.pip 
-bash: /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.

 

你可能感兴趣的:(Python,Python)