1.下载安装包:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh

2.上传文件到临时文件夹:/home/python

[root@data2 python]# pwd
/home/python
[root@data2 python]# ls -lrt
总用量 674568
-rw-r--r--.  1 root root  22745726 8月  19 21:03 Python-3.7.0.tgz
-rw-r--r--.  1 root root     18000 8月  19 21:08 libffi-devel-3.0.5-3.2.el6.x86_64.rpm
drwxr-xr-x. 19  501  501      4096 8月  19 21:15 Python-3.7.0
-rw-r--r--.  1 root root 667976437 8月  19 21:49 Anaconda3-5.3.1-Linux-x86_64.sh

3.执行bash Anaconda3-5.3.1-Linux-x86_64.sh

[root@data2 python]# bash Anaconda3-5.3.1-Linux-x86_64.sh
Welcome to Anaconda3 5.3.1
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>

4.一路回车到达是否同意license确认页面,选择yes,回车

Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'
>>> yes

5.使用默认安装目录/root/anaconda3,回车

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] >>>

6.组件安装中…,等待

[/root/anaconda3] >>>
PREFIX=/root/anaconda3
installing: python-3.7.0-hc3d631a_0 ...
Python 3.7.0
installing: blas-1.0-mkl ...
installing: ca-certificates-2018.03.07-0 ...
installing: conda-env-2.6.0-1 ...
installing: intel-openmp-2019.0-118 ...

......

7.确认用户的.bashrc文件中是否初始化Anaconda3的相关内容,选择yes继续,直到安装完成

installation finished.
Do you wish the installer to initialize Anaconda3
in your /root/.bashrc ? [yes|no]
[no] >>> yes

Initializing Anaconda3 in /root/.bashrc
A backup will be made to: /root/.bashrc-anaconda3.bak

For this change to become active, you have to open a new terminal.

Thank you for installing Anaconda3!
[root@data2 python]#

8.编辑/root/.bashrc文件,在配置文件后添加source /root/anaconda3/etc/profile.d/conda.sh

[root@data2 python]# vim /root/.bashrc

source /root/anaconda3/etc/profile.d/conda.sh

9.激活配置文件

[root@data2 python]# source /root/.bashrc
[root@data2 python]#

10.验证是否安装成功:

[root@data2 python]# python
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit();
[root@data2 python]#

安装成功
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐