步骤
安装Anaconda3
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh
如果提示没有wget,使用yum安装:
yum -y install wget
在下载目录中执行该文件,根据下载的版本不同,名称会有不同:
bash Anaconda3-2020.02-Linux-x86_64.sh
接下来会出现一堆的License许可声明,一路回车向下,出现如下文字,输入yes:
Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':
>>> yes
之后要选择安装目录,如果无需更改直接回车Enter,如需更改要输入绝对路径:
(可以先查看下硬盘的挂载情况再自行选择安装目录,查看挂载情况的语句是df -h)
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
[/root/anaconda3] >>>
出现如下信息:
ERROR: File or directory already exists: '/root/anaconda3'
If you want to update an existing installation, use the -u option.
安装到一个新的路径,比如/root/caozx/22-anaconda3(22-anaconda3还未创建)
[/root/anaconda3] >>> /root/caozx/22-anaconda3
询问是否初始化,若选择yes,是在/root/.bashrc目录中自动添加环境变量,会使得开机自动启动base环境。(这里应该是新版安装包的改动之处,老版本的安装包都是问是否需要添加conda至环境变量,且默认直接回车Enter是不添加,若未添加后续需要手动添加。)
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> no
看到如下提示则安装成功:
Thank you for installing Anaconda3!
===========================================================================
Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated