【服务器】在 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
相关推荐
王志来1379447300813 分钟前
聚焦五大核心场景:工控服务器机箱平台的垂直深耕之路
运维·服务器·python
zmzb010320 分钟前
Python课后习题训练记录Day193
开发语言·python
卷无止境22 分钟前
LiteLLM 全面解析开源AI网关如何统一管理百余种大模型
后端·python
ii_best28 分钟前
手机自动化脚本按键精灵实战:随机布局安全数字键盘的自动化输入方案
android·运维·ios·自动化·手机
鲁邦通物联网29 分钟前
充电站底层脱机DLB引擎解构:基于Linux调度的边缘计算网关并发控制实战
linux·运维·人工智能·边缘计算·边缘计算网关·5g数采·工业级边缘计算网关
我的xiaodoujiao42 分钟前
使用PyMySQL模块技术操作MySQL数据库
数据库·python·测试工具·mysql
便利店10241 小时前
边界与远程:墙、洞与加密通道
运维·服务器·防火墙·acl·nat
TAN-90°-1 小时前
Deep Learning for Computer Vision——Training CNNs and CNN Architectures
人工智能·深度学习·神经网络·算法·机器学习·计算机视觉·cnn
卷无止境1 小时前
终端里的AI辅助,一场正在发生的编程效率变革
后端·python
苏灿烤鱼1 小时前
上下文写成文件系统,为什么向量还能静默丢?
python·github·agent