如果是anaconda安装到默认的位置(~/anaconda2)直接删除文件就可以了,但是这样再次启动python会出现
bash: /home/media/anaconda2/bin/python: No such file or directory
这是因为python路径改变了
解决方法:
hash -r
变为默认设置。参考https://ss64.com/osx/hash.html
hash
Refresh the cached/remembered location of commands.
Logging out and in will refresh this automatically, but if you have just updated or reinstalled a package you might want to force an update.
Syntax
hash [-lr] [-p filename] [-dt] [name]
Key
-p Use filename as the full file name of the command (no path search is performed).
-t Print the full pathname to which each name corresponds.
-l Display output in a format that can be reused as input.
-d Forget the remembered location of each name.
-r Forget all remembered locations.
anaconda下的python位于bin/python,还是可以使用的