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.