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 
相关推荐
不染尘.6 分钟前
Linux磁盘分区和NAT网络配置
linux·运维·网络·windows·ssh
model20056 分钟前
alibaba linux3 定时下载任务未执行
linux·运维·服务器
盘古信息IMS19 分钟前
WMS 智能仓储管理系统推荐,如何搭建数智化时代的敏捷仓储平台
大数据·运维
nie_xl19 分钟前
VS/TRAE中设置本地maven地址的方法
运维·服务器·前端
yuanmenghao25 分钟前
车载Linux 系统问题定位方法论与实战系列 - 开篇: 为什么需要一套“系统化”的 Linux 问题定位方法
linux·运维·服务器·数据结构·c++·自动驾驶
岁岁种桃花儿27 分钟前
深入理解 Keepalive:从协议到 Nginx 实战(全场景解析)
运维·nginx
CheungChunChiu27 分钟前
# Xorg 配置与 modesetting 驱动详解:从设备节点到显示旋转
android·linux·ubuntu·显示·xserver
柏木乃一28 分钟前
基础IO(上)
linux·服务器·c语言·c++·shell
DeeplyMind31 分钟前
第7章:DRM内核调试技术:7.1 DRM DebugFS的使用
linux·驱动开发·drm·debugfs·drm debugfs
提伯斯64634 分钟前
Fast-LIO到MAVROS视觉定位转换
linux·ros·无人机·mid360·fasltlio