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#
相关推荐
tntxia1 天前
linux curl命令详解_curl详解
linux
扛枪的书生1 天前
Linux 网络管理器用法速查
linux
顺风尿一寸1 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode1 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫2 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux
AlfredZhao3 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80
戴为沐4 天前
Linux内存扩容指南
linux
zylyehuo5 天前
Linux 彻底且安全地删除文件
linux
用户805533698035 天前
主线 U-Boot 上 RK3506:和闭源 rkbin 拔河的三个隐性契约
linux·嵌入式
用户034095297915 天前
linux fcitx 5 雾凇拼音 设置在中文输入法下仍然输入英文标点
linux