• 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。

    1. root@bogon:/home/test# conda --version
    2. conda 4.8.2
    3. root@bogon:/home/test#
    4. root@bogon:/home/test# conda deactivate
    5. root@bogon:/home/test#
    6. root@bogon:/home/test# which conda
    7. /root/anaconda3/condabin/conda
    8. root@bogon:/home/test# /path/to/conda/bin/conda install anaconda-clean
    9. -bash: /path/to/conda/bin/conda: No such file or directory
    10. root@bogon:/home/test# /root/anaconda3/condabin/conda install anaconda-clean
    11. Collecting package metadata (current_repodata.json): failed
    12. CondaHTTPError: HTTP 000 CONNECTION FAILED for url
    13. Elapsed: -
    14. An HTTP error occurred when trying to retrieve this URL.
    15. HTTP errors are often intermittent, and a simple retry will get you on your way.
    16. If your current network has https://www.anaconda.com blocked, please file
    17. a support request with your network engineering team.
    18. 'https://repo.anaconda.com/pkgs/main/linux-64'
    19. root@bogon:/home/test#

  • 相关阅读:
    【共读】企业信息安全建设与运维指南(二)
    SpringBean生命周期
    nvm:npm ERR! Unexpected token ‘.‘
    Python 潮流周刊#49:谷歌裁员 Python 团队,微软开源 MS-DOS 4.0
    Ubuntu20.04软件安装顺序
    《新资源新蓝海-人类智能共同体》
    想了解Python中的super 函数么
    利用WebShell拿Shell技巧
    强大的JTAG边界扫描(1):基本原理介绍
    C# OpenCvSharp 基于直线检测的文本图像倾斜校正
  • 原文地址:https://blog.csdn.net/songpeiying/article/details/134459383