切换国内镜像源

备份下

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--->回车(就会保存到当前用户的目录下,比如是root就在root/anaconda3)>再次输入yes

如果这一步你没有yes,按的回车他就会默认no

此时需要自己添加环境变量echo 'export PATH="conda路径/bin:$PATH"' >> ~/.bashrc

配置环境变量

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

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

更新

source ~/.bashrc

输入conda

成功

好文阅读

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: