Anaconda: Linux下安装Anaconda

一.说明

1.Linux: CentOS7

2.Anaconda: Anaconda3-2018.12-Linux-x86_64

3.这只是个人的记录,最终以官网安装步骤为准(见参考资料链接)。

二.安装步骤

1.软件下载

进入到anaconda官网下载linux版本:https://www.anaconda.com/download/#linux

(2)使用bash命令安装

进入到下载目录,然后bash命令,如:

[Sweeneys@localhost Downloads]$ bash Anaconda3-2018.12-Linux-x86_64.sh 

然后一直按提示操作即可。 

(3)配置环境变量 

虽然官网说:

The installer prompts “Do you wish the installer to prepend the Anaconda<2 or 3> install location to PATH in your /home/<user>/.bashrc ?” Enter Yes.

NOTE: If you enter “No”, you must manually add the path to Anaconda or conda will not work. See FAQ.

但是实际安装的时候如果没有出现这一步或者你选择了"No",那么就需要自己配置环境变量。配置环境变量步骤

打开.bashrc文件:

[Sweeneys@localhost Downloads]$ vi ~/.bashrc

在.bashrc文件里面输入anconda的bin目录路径,如:

 export PATH="/home/Sweeneys/anaconda3/bin:$PATH"

如果选择了“yes”,那么大概会是这样:

(4)刷新环境变量

配置了环境变量并不会生效,需要刷新才会生效。

[Sweeneys@localhost ~]$ source ~/.bashrc

三.验证安装

查看anconda版本,验证是否安装成功。

[Sweeneys@localhost ~]$ conda --version

结果如下图所示: 

四.参考资料

[1]Anaconda官网linux版安装步骤:https://docs.anaconda.com/anaconda/install/linux/

[2]Anaconda官网linux版配置环境变量步骤:https://docs.anaconda.com/anaconda/user-guide/faq/#distribution-faq-linux-path

猜你喜欢

转载自blog.csdn.net/cckavin/article/details/86663352
今日推荐