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 
相关推荐
C语言小火车1 天前
嵌入式Linux应用开发技术栈完全指南
linux·运维·服务器
IT WorryFree1 天前
FortiGate 排错常用OID速查表(含Trap OID+轮询OID)
运维·网络
m0_738120721 天前
渗透测试基础——基于Docker的Rsync服务靶场搭建与原理讲解
运维·服务器·网络·安全·web安全·docker·容器
MXsoft6181 天前
**运维监控技术演进:从数据采集到智能运维的****技术提升**
运维
12点一刻1 天前
Hermes Agent 与 Superpowers 框架的区别?
运维·服务器
MXsoft6181 天前
**混合云统一监控实践:私有云+公有云的一体化运维方案**
运维·网络·数据库
2501_912784081 天前
Taocarts深度解析:1688自动代采模块的Puppeteer自动化实战
运维·自动化
天南散修1 天前
MT7916驱动中802.11转换为802.3
linux·网络·驱动开发·wifi·802.11
MXsoft6181 天前
**断网续传与本地缓存:弱网环境下的监控数据保障方案**
运维·缓存·自动化
LT10157974441 天前
2026年UI自动化测试平台选型指南:全界面自动化覆盖方案
运维·ui·自动化