Linux 环境删除Conda

你可以按照以下步骤操作来删除Conda:

  1. 首先,停止所有conda环境。在终端中运行以下命令:

    复制代码
    conda deactivate
  2. 然后使用以下命令获取conda安装的路径:

    复制代码
    which conda

    如果成功安装了conda,该命令输出的路径应该是类似于这样的:

    复制代码
    /path/to/conda/bin/conda
  3. 接下来,卸载conda。使用以下命令:

    复制代码
    /path/to/conda/bin/conda install anaconda-clean

    这将安装anaconda-clean程序,该程序可以轻松地卸载conda。

  4. 安装完成后,运行以下命令:

    复制代码
    anaconda-clean

    这将提示您输入"yes"以确认卸载conda。

  5. 一旦卸载完成,您需要从.bashrc文件中删除conda路径。运行以下命令:

    复制代码
    nano ~/.bashrc

    删除以下行:

    复制代码
    export PATH="/path/to/conda/bin:$PATH"

    这里的/path/to/conda应该是您在第2步中获取的conda安装路径。

  6. 保存并关闭文件。重新加载配置文件以使更改生效:

    复制代码
    source ~/.bashrc

现在,您已经成功地从centos系统中删除了Conda。

bash 复制代码
root@bogon:/home/test# conda --version
conda 4.8.2
root@bogon:/home/test#
root@bogon:/home/test# conda deactivate
root@bogon:/home/test#
root@bogon:/home/test# which conda
/root/anaconda3/condabin/conda
root@bogon:/home/test# /path/to/conda/bin/conda install anaconda-clean
-bash: /path/to/conda/bin/conda: No such file or directory
root@bogon:/home/test# /root/anaconda3/condabin/conda install anaconda-clean
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

'https://repo.anaconda.com/pkgs/main/linux-64'


root@bogon:/home/test#
相关推荐
木下~learning9 分钟前
对于Linux中等待队列和工作队列的讲解和使用|RK3399
linux·c语言·网络·模块化编程·工作队列·等待队列
齐齐大魔王13 分钟前
linux-核心工具
linux·运维·服务器
醇氧14 分钟前
Linux 系统的启动过程
linux·运维·服务器
IMPYLH14 分钟前
Linux 的 dircolors 命令
linux·运维·服务器·数据库
齐齐大魔王18 分钟前
linux-基础操作
linux·运维·服务器
bwz999@88.com1 小时前
ubuntu24.04更换国内源
linux·运维·服务器
历程里程碑1 小时前
Protobuf 环境搭建:Windows 与 Linux 系统安装教程
linux·运维·数据结构·windows·线性代数·算法·矩阵
XXOOXRT1 小时前
Ubuntu搭建Java项目运行环境(JDK17+MySQL8.0)超详细教程
java·linux·mysql·ubuntu
吴声子夜歌1 小时前
TypeScript——类型基础(二)
linux·ubuntu·typescript
vvw&1 小时前
如何从 Ubuntu 24.04 升级到 Ubuntu 25.04
linux·运维·服务器·ubuntu