1、准备下载连接
官网下载连接 https://www.anaconda.com/distribution/#download-section
Linux执行下载命令:
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh
2、对安装目录赋安装权限(有权限的可忽略)
sudo chmod 777 Anaconda3-2019.07-Linux-x86_64.sh
3、进入所在文件夹,执行安装命令
sudo ./Anaconda3-2019.07-Linux-x86_64.sh
会提示让阅读协议,一直回车,阅读完后 输入yes后提示安装路径
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
按 回车键确认安装路径。
4、配置环境变量
上面显示的安装路径为“/root/anaconda3”
修改环境变量文件:
vim /etc/profile
在文件末尾追加:
export ANACONDA_HOME=/root/anaconda3/bin
export PATH=$ANACONDA_HOME:$PATH
追加后,输入vim命令 :wq 保持退出。并输入以下命令使环境变量生效:
source /etc/profile
5、测试安装是否完成
[root@138 bin]# conda -V
conda 4.7.10
[root@138 bin]# python3 -V
Python 3.7.3
以上代表安装已经完成。