如何卸载mini conda?python

如何卸载mini conda?python,python,pip,uninstallation,conda,miniconda,Python,Pip,Uninstallation,Conda,Miniconda,我已安装conda软件包,如下所示: $ wget http://bit.ly/miniconda $ bash miniconda $ conda install numpy pandas scipy matplotlib scikit-learn nltk ipython-notebook seaborn 我想卸载它,因为它扰乱了我的PIP和环境 如何完全卸载conda? 它还会卸载我的pip管理包吗?如果是这样,有没有办法在不卸载pip管理的软件包的情况下安全卸载conda? 只需删除

我已安装conda软件包,如下所示:

$ wget http://bit.ly/miniconda
$ bash miniconda
$ conda install numpy pandas scipy matplotlib scikit-learn nltk ipython-notebook seaborn
我想卸载它,因为它扰乱了我的PIP和环境

  • 如何完全卸载conda?
  • 它还会卸载我的pip管理包吗?如果是这样,有没有办法在不卸载pip管理的软件包的情况下安全卸载conda?
只需删除
miniconda
文件夹

rm -r ~/miniconda/
为了避免不同Python环境之间的冲突,可以使用虚拟环境。特别是,对于Miniconda,可以使用以下工作流:

$wgethttps://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O~/miniconda.sh
$bash miniconda
$conda env remove--yes-n new#env#删除环境new#env(如果存在)(可选)
$conda create--yes-n新建_env pip numpy pandas scipy matplotlib scikit学习nltk ipython笔记本seaborn python=2
$activate new_env
$#如果需要,pip安装模块,运行python脚本等
#所有设备都将安装在新的_env中
#位于~/miniconda/envs/new_env
$deactivate

您必须在~/.bashrc中注释该行:

#export PATH=/home/jolth/miniconda3/bin:$PATH
并运行:

source ~/.bashrc

如果您使用的是windows,只需搜索miniconda即可找到该文件夹。进入该文件夹,您会发现一个miniconda卸载exe文件。运行它。

完全卸载conda(Anaconda/Miniconda)的正确方法:

  • 使用Anaconda Clean软件包删除所有与conda相关的文件和目录

    conda activate your_conda_env_name
    conda install anaconda-clean
    anaconda-clean # add `--yes` to avoid being prompted to delete each one
    
  • 删除整个conda目录

    rm -rf ~/miniconda3
    
  • 删除将conda路径添加到
    path
    环境变量的行

    vi ~/.bashrc
    # -> Search for conda and delete the lines containing it
    # -> If you're not sure if the line belongs to conda, comment it instead of deleting it just to be safe
    source ~/.bashrc
    
  • 删除由Anaconda Clean软件包创建的备份文件夹 注意:在执行此操作之前请三思,因为在此之后,您将无法从旧的conda安装中恢复任何内容

    rm -rf ~/.anaconda_backup
    

  • 参考:

    要更新@Sunil答案:在Windows下,Miniconda有一个常规的卸载程序。转到“设置/应用程序/应用程序和功能”菜单,或单击开始按钮,键入“卸载”,然后单击“添加或删除程序”,最后单击Miniconda卸载程序。

    如果使用
    pip
    将内容安装到Miniconda Python中,则删除Miniconda目录也会将其删除。如果您将它们安装到另一个Python安装中,那么它将不会。还将删除
    ~/.bash\u配置文件中的路径导出。4.1版的~/.bashrc中添加了路径。11@bugmenot123这取决于你的操作系统。对于Linux,它位于~/.bashrc中,而对于MacOS(可能还有BSD),它位于~/.bash_profile中。在windows上,使用卸载程序/应用程序的正常方式,但请查找“Python X.X(Miniconda xxx)”。看,巨蟒清洁剂实际上是做什么的?