如何从MacOS Sierra完全卸载Anaconda并恢复到原始的Python?我试过用conda-clean,是的,但没用。我还删除了~/中的东西。bash_profile,但它仍然使用Anaconda python,我仍然可以运行conda命令。


当前回答

卸载Anaconda打开终端窗口:

删除整个anaconda安装目录:

rm -rf ~/anaconda

编辑~ /。然后从PATH环境变量中删除anaconda目录。

注意:您可能需要编辑.bashrc和/或.profile文件而不是.bash_profile

删除以下隐藏文件和目录,这些文件和目录可能已经在主目录下创建: .condarc .conda .continuum

Use:

rm -rf ~/.condarc ~/.conda ~/.continuum

其他回答

在我的情况下(Mac High Sierra),它被安装在~/opt/anaconda3。

https://docs.anaconda.com/anaconda/install/uninstall/

这对我来说很有效:

conda remove --all --prefix /Users/username/anaconda/bin/python

然后从.bash_profile中的$PATH中删除

取消设置~/。bash_profile的PYTHONPATH和PYTHONHOME

(ps:当你调试Arduino时,你可能已经设置了这些变量。这会混淆conda's env)

运行Anaconda的卸载命令后,miniconda3仍然显示在路径中。最终这对我来说是有效的:

打开终端(我使用zsh)

open ~/.zshrc

删除内容,保存,退出终端,重新打开。

这终于为我解决了永恒的conda问题!

下面这行不行吗?

rm -rf ~/anaconda3 

您应该知道anaconda3(或anaconda1、anaconda2)安装在哪里。所以写

which anaconda

输出

output: somewhere

现在在某个地方使用它并运行:

rm -rf somewhere