【服务器】在 Linux CLI 下安装 Anaconda

1 系统环境

  1. 查看系统信息
cat /etc/os-release

在这里插入图片描述
2. 查看架构

uname -a
# output
# Linux localhost.localdomain 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Thu Oct 22 00:20:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

2 下载安装包

官方地址: Link

  1. 选择安装包,右键复制链接

在这里插入图片描述

如果需要安装其他版本,可以在这里找: Link

  1. wget 下载: wget -P [指定安装路径] url[url为复制的链接]
 wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

3 安装

参考文档: Link

  1. 运行 .sh 安装脚本
bash Anaconda3-2023.09-0-Linux-x86_64.sh
  • 长按 Enter,Do you accept the license terms? [yes|no]: yes
  • Anaconda3 will now be installed into this location: Enter (建议安装至用户目录下)

在这里插入图片描述

  • You can undo this by running `conda init --reverse $SHELL`? [yes|no]: no(如果这里选择了 yes,可直接跳至第 3 步)

完成后,终端显示: Thank you for installing Anaconda3!

  1. 初始化 conda
source ~/anaconda3/bin/activate
conda init
  1. (Optional) 设置打开终端不自动进入 conda 的 base 环境,即需要自己激活相应的虚拟环境
source ~/.bashrc
conda config --set auto_activate_base false
  1. 验证
source ~/.bashrc
conda env list

在这里插入图片描述

阅读全文
AI总结
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐