切换国内镜像源
备份下
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
成功文章来源:https://www.toymoban.com/news/detail-718074.html
文章来源地址https://www.toymoban.com/news/detail-718074.html
到了这里,关于ubuntu安装python以及conda的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!