Anaconda3下载
从Anaconda官网下载linux版本:
https://repo.anaconda.com/archive/
Anaconda3安装
将下载好的文件
Anaconda3-5.0.1-Linux-x86_64.sh执行如下命令:
# bash Anaconda3-5.0.1-Linux-x86_64.sh
安装过程中修改Anaconda3的安装路径为/usr/local/anaconda3:
Do you accept the license terms? [yes|no]
Please answer 'yes' or 'no':'
>>> 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
[/root/anaconda3] >>> /usr/local/anaconda3
PREFIX=/opt/modules/anaconda3
报错:
[/root/anaconda2] >>>
PREFIX=/root/anaconda3
Anaconda3-5.0.1-Linux-x86_64.sh: line 317: bunzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
解决:
安装bzip2即可解决
[root@Aruen ~]# yum install -y bzip2 删掉/usr/local下的anaconda3文件夹,重新执行 # bash Anaconda3-5.0.1-Linux-x86_64.sh 重复上面操作 等待安装完成提示信息,询问是否要将Anaconda3添加到PATH环境变量中,直接回车(选择no): installation finished. Do you wish the installer to prepend the Anaconda3 install location to PATH in your /root/.bashrc ? [yes|no] [no] >>> You may wish to edit your .bashrc to prepend the Anaconda3 install location to PATH: export PATH=/opt/modules/anaconda3/bin:$PATH Thank you for installing Anaconda3! 手动将export PATH=/opt/modules/anaconda3/bin:$PATH添加到/etc/profile中, 最后source /etc/profile使环境变量生效: # source /etc/profile
验证是否安装成功:
[root@Aruen ~]# python -V
Python 3.6.3 :: Anaconda, Inc.