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

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

  • [1 系统环境](#1 系统环境)
  • [2 下载安装包](#2 下载安装包)
  • [3 安装](#3 安装)

1 系统环境

  1. 查看系统信息
bash 复制代码
cat /etc/os-release
  1. 查看架构
bash 复制代码
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. 选择安装包,右键复制链接
  2. wget 下载: wget -P [指定安装路径] url[url为复制的链接]
bash 复制代码
 wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

3 安装

  1. 运行 .sh 安装脚本
bash 复制代码
sh Anaconda3-2023.09-0-Linux-x86_64.sh
  • Do you accept the license terms? yes\|no: yes
  • Anaconda3 will now be installed into this location: (建议安装至用户目录下)
  • You can undo this by running conda init --reverse $SHELL? yes\|no: no
  1. 在当前 shell 中激活 conda 环境
  • 确定当前 shell 的类型
bash 复制代码
echo $SHELL
# output
# /bin/bash
  • 下面命令中的 shell.YOUR_SHELL_NAME 改为 shell.bash
bash 复制代码
eval "$(/home/guochenhui/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
  1. 激活 conda
bash 复制代码
conda init
  1. 启动时不进入 conda 的 base 环境,即需要自己激活相应的虚拟环境
bash 复制代码
conda config --set auto_activate_base false
  1. 验证

关闭当前 shell,重新打开一个

bash 复制代码
conda env list
相关推荐
Sokach10156 小时前
Linux Shell 脚本从零到能用:一个新手的一天学习总结
linux
曲幽6 小时前
刚部署的 LibreTranslate 频频翻车?我掏出了 20 年前的 StarDict 词典,用 FastAPI 搭了个本地词典翻译 API
python·fastapi·web·translate·goldendict·libretranslate·stardict·pystardict
荣码7 小时前
用Streamlit给AI应用套个界面,10行代码出Web页面
java·python
武子康7 小时前
调查研究-189 Kronos 调研:金融 K 线基础模型,是真突破,还是量化圈的新玩具?
人工智能·深度学习·openai
兵慌码乱16 小时前
基于Python+PyQt5+SQLite的药房管理系统实现:事务一致性与界面解耦全流程解析
python·sqlite·信号与槽·pyqt5·数据库设计·桌面应用开发·事务处理
金銀銅鐵18 小时前
[Python] 体验用欧几里得算法计算最大公约数的过程
python·数学
FreakStudio21 小时前
W55MH32L-EVB 上手测评:硬件 TCP/IP 加持的以太网单片机,MicroPython 零门槛开发
python·单片机·嵌入式·大学生·面向对象·并行计算·电子diy·电子计算机
SelectDB21 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
AlfredZhao1 天前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
用户0332126663671 天前
使用 Python 从零创建 Word 文档
python