如何从 macOS 完全卸载 Anaconda [英] How to uninstall Anaconda completely from macOS

查看:64
本文介绍了如何从 macOS 完全卸载 Anaconda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 MacOS Sierra 中完全卸载 Anaconda 并恢复到原始 Python?我曾尝试使用 conda-clean -yes 但这不起作用.我还删除了 ~/.bash_profile 中的内容,但它仍然使用 Anaconda python,我仍然可以运行 conda 命令.

How can I completely uninstall Anaconda from MacOS Sierra and revert back to the original Python? I have tried using conda-clean -yes but that doesn't work. I also remove the stuff in ~/.bash_profile but it still uses the Anaconda python and I can still run the conda command.

推荐答案

删除配置:

conda install anaconda-clean
anaconda-clean --yes

删除配置后,您可以删除 anaconda 安装文件夹,该文件夹通常位于您的主目录下:

Once the configs are removed you can delete the anaconda install folder, which is usually under your home dir:

rm -rf ~/anaconda3

此外,anaconda-clean --yes 命令会在您的主目录中创建一个格式为 ~/.anaconda_backup/ 的备份.确保也删除那个.

Also, the anaconda-clean --yes command creates a backup in your home directory of the format ~/.anaconda_backup/<timestamp>. Make sure to delete that one also.

EDIT (v5.2.0):现在,如果您想清除所有内容,还必须删除添加到 .bash_profile 中的最后两行.它们看起来像:

EDIT (v5.2.0): Now if you want to clean all, you will also have to delete the two last lines added to your .bash_profile. They look like:

# added by Anaconda3 5.2.0 installer
export PATH="/Users/ody/anaconda3/bin:$PATH"

这篇关于如何从 macOS 完全卸载 Anaconda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆