ubuntu安装python以及conda

切换国内镜像源

备份下

sudo cp /etc/apt/sources.list /etc/apt/sources_init.list

更换源

sudo vi /etc/apt/sources.list

开头加
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
更新源

sudo apt-get update

安装python以及pip

sudo apt-get install python3-pip

看一下成功没

pip3 -V

安装conda

下载

wget https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2022.10-Linux-x86_64.sh --no-check-certificate

安装

bash Anaconda3-2022.10-Linux-x86_64.sh

安装中...

回车-->输入yes-->再次输入yes

配置环境变量

他默认安装的是自己的用户目录下

他会自动给你把conda路径加到环境变量 ~/.bashrc下

更新

source ~/.bashrc

输入conda

成功

ubuntu安装python以及conda_第1张图片

你可能感兴趣的:(ubuntu,conda,linux)