Ubuntu16.04安裝Anaconda2和Anaconda3

1. 安裝Anaconda2;

darcy@darcy-pc:~$ bash Anaconda2-4.3.0-Linux-x86_64.sh 

Welcome to Anaconda2 4.3.0 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

輸入Enter回車, 下面讓你看License,直接往下翻到最後

================
Anaconda License
================

Copyright 2016, Continuum Analytics, Inc.

All rights reserved under the 3-clause BSD License:
...
cryptography
A Python library which exposes cryptographic recipes and primitives.

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

輸入yes;

Anaconda2 will now be installed into this location:
/home/darcy/anaconda2

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/darcy/anaconda2] >>> 

輸入Enter回車, 安裝到默認目錄;

PREFIX=/home/darcy/anaconda2
installing: python-2.7.13-0 ...
...
installing: anaconda-4.3.0-np111py27_0 ...
installing: ruamel_yaml-0.11.14-py27_1 ...
installing: conda-4.3.8-py27_0 ...
installing: conda-env-2.6.0-0 ...
Python 2.7.13 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Anaconda2 install location
to PATH in your /home/darcy/.bashrc ? [yes|no]
[no] >>> yes

輸入yes, 添加路徑到配置文件;

Prepending PATH=/home/darcy/anaconda2/bin to PATH in /home/darcy/.bashrc
A backup will be made to: /home/darcy/.bashrc-anaconda2.bak

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

Thank you for installing Anaconda2!

Share your notebooks and packages on Anaconda Cloud!
Sign up for free: https://anaconda.org

執行 如下命令,激活配置環境

darcy@darcy-pc:~$ source ~/.bashrc
darcy@darcy-pc:~$ python
Python 2.7.13 |Anaconda 4.3.0 (64-bit)| (default, Dec 20 2016, 23:09:15) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> 
>>> exit()

2. 安裝Anaconda3

darcy@darcy-pc:~$ bash Anaconda3-4.3.0-Linux-x86_64.sh 

Welcome to Anaconda3 4.3.0 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

Enter回車, 直接到License顯示完畢;

================
Anaconda License
================

Copyright 2016, Continuum Analytics, Inc.

All rights reserved under the 3-clause BSD License:

...
cryptography
A Python library which exposes cryptographic recipes and primitives.

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

輸入yes, 同意 License;

Anaconda3 will now be installed into this location:
/home/darcy/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/darcy/anaconda3] >>> 

輸入Enter回車, 安裝到默認目錄;

PREFIX=/home/darcy/anaconda3
installing: python-3.6.0-0 ...
installing: _license-1.1-py36_1 ...
...
installing: zlib-1.2.8-3 ...
installing: anaconda-4.3.0-np111py36_0 ...
installing: ruamel_yaml-0.11.14-py36_1 ...
installing: conda-4.3.8-py36_0 ...
installing: conda-env-2.6.0-0 ...
Python 3.6.0 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/darcy/.bashrc ? [yes|no]
[no] >>> yes

輸入yes, 添加環境變量;

Prepending PATH=/home/darcy/anaconda3/bin to PATH in /home/darcy/.bashrc
A backup will be made to: /home/darcy/.bashrc-anaconda3.bak


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

Thank you for installing Anaconda3!

Share your notebooks and packages on Anaconda Cloud!
Sign up for free: https://anaconda.org

執行如下命令,激活配置文件;

darcy@darcy-pc:~$ source ~/.bashrc
darcy@darcy-pc:~$ python3
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> exit()
darcy@darcy-pc:~$ /usr/bin/py
py3clean      pyclean       pydoc3        pygettext3    python2.7     python3m      
py3compile    pycompile     pydoc3.5      pygettext3.5  python3       pyversions    
py3versions   pydoc         pygettext     python        python3.5     
pybuild       pydoc2.7      pygettext2.7  python2       python3.5m    
darcy@darcy-pc:~$ /usr/bin/python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
darcy@darcy-pc:~$ /usr/bin/python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

最後兩個自帶的Python解釋器和兩個Anaconda的解釋器共存。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章