ubuntu22.04安装anaconda

1.安装依赖包

bash 复制代码
sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

2.查看系统架构

bash 复制代码
uname -m
dpkg --print-architecture

3.下载anaconda

Download Anaconda Distribution | AnacondaDownload Anaconda's open-source Distribution today. Discover the easiest way to perform Python/R data science and machine learning on a single machine.https://www.anaconda.com/download

安装miniconda流程也是一样,选右边即可

或在在这个里面找自己想要的版本

Index of /archivehttps://repo.anaconda.com/archive/下载过程比较慢,耐心等待

4.安装anaconda

在下载目录打开终端

bash 复制代码
bash Anaconda3-2025.06-0-Linux-x86_64.sh

一直enter键或在yes即可

5.添加环境变量

bash 复制代码
gedit .bashrc

若.bashrc文件里面没有添加

则手动在文件末端加入环境变量

bash 复制代码
export PATH=~/anaconda3/bin:$PATH
source ~/anaconda3/bin/activate

6.退出/进入(base)环境

bash 复制代码
(base) fishros@fishros-linux:~$ conda deactivate
fishros@fishros-linux:~$ source ~/anaconda3/bin/activate
(base) fishros@fishros-linux:~$ 

7.创建自己虚拟环境

bash 复制代码
conda create --name my_env python=3
conda activate my_env

8.卸载anaconda

在anaconda目录里直接bash uninstall.sh 输入yes即可

若anaconda被安装到root路径下

bash 复制代码
fishros@fishros-linux:~$ sudo su
(base) root@fishros-linux:/home/fishros# cd /root
(base) root@fishros-linux:~# cd anaconda3/
(base) root@fishros-linux:~/anaconda3#sudo bash uninstall.sh 
相关推荐
chlk1231 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑1 天前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件1 天前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
碳基沙盒1 天前
OpenClaw 多 Agent 配置实战指南
运维
深紫色的三北六号2 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash2 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI2 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行3 天前
Linux和window共享文件夹
linux
Sinclair3 天前
简单几步,安卓手机秒变服务器,安装 CMS 程序
android·服务器
木心月转码ing3 天前
WSL+Cpp开发环境配置
linux