Ubuntu 16.4 安装anaconda 详细教程

下载

官方下载地址:https://www.continuum.io/downloads
所有安装包地址:https://repo.continuum.io/archive/
这里使用 Python 3.5 版本的 “Anaconda3-4.2.0-Linux-x86_64.sh”

安装

这里参考官方文档:https://docs.continuum.io/anaconda/install/linux.html

根据提示,键入enter继续向下安装

kxlc-t@ubuntu:~/Downloads$ bash Anaconda3-5.1.0-Linux-x86_64.sh 

Welcome to Anaconda3 5.1.0

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

阅读完注册信息后,输入yes

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

回车即可安装

Anaconda3 will now be installed into this location:
/home/kxlc-t/anaconda3

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

[/home/kxlc-t/anaconda3] >>> 

安装如预期在正常进行

Anaconda3 will now be installed into this location:
/home/kxlc-t/anaconda3

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

[/home/kxlc-t/anaconda3] >>> 
PREFIX=/home/kxlc-t/anaconda3
installing: python-3.6.4-hc3d631a_1 ...
Python 3.6.4 :: Anaconda, Inc.
installing: ca-certificates-2017.08.26-h1d4fec5_0 ...
installing: conda-env-2.6.0-h36134e3_1 ...
installing: intel-openmp-2018.0.0-hc7b2577_8 ...
installing: libgcc-ng-7.2.0-h7cc24e2_2 ...
installing: libgfortran-ng-7.2.0-h9f7466a_2 ...
installing: libstdcxx-ng-7.2.0-h7a57d05_2 ...
installing: bzip2-1.0.6-h9a117a8_4 ...
installing: expat-2.2.5-he0dffb1_0 ...
installing: gmp-6.1.2-h6c8ec71_1 ...
installing: graphite2-1.3.10-hf63cedd_1 ...
installing: icu-58.2-h9c2bf20_1 ...
installing: jbig-2.1-hdba287a_0 ...
installing: jpeg-9b-h024ee3a_2 ...
installing: libffi-3.2.1-hd88cf55_4 ...
installing: libsodium-1.0.15-hf101ebd_0 ...
installing: libtool-2.4.6-h544aabb_3 ...
installing: libxcb-1.12-hcd93eb1_4 ...
installing: lzo-2.10-h49e0be7_2 ...
installing: mkl-2018.0.1-h19d6760_4 ...

输入yes,加入环境变量

看到这些信息说明已经安装完成。
根据信息“For this change to become active, you have to open a new terminal.”(要使这个更改生效,必须打开一个新的终端。)这句话提示,需要在新的终端窗口使用anaconda,打开新的终端,查看相应的版本信息

查看 conda 的版本号

kxlc-t@ubuntu:~$ conda -V
conda 4.4.10
kxlc-t@ubuntu:~$ 

 

打开 Jupyter Notebook

notebook的打开方式,也很简单

kxlc-t@ubuntu:~$ jupyter notebook
[I 01:48:14.486 NotebookApp] The port 8888 is already in use, trying another port.
[I 01:48:14.711 NotebookApp] JupyterLab beta preview extension loaded from /home/kxlc-t/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 01:48:14.712 NotebookApp] JupyterLab application directory is /home/kxlc-t/anaconda3/share/jupyter/lab
[I 01:48:14.759 NotebookApp] Serving notebooks from local directory: /home/kxlc-t
[I 01:48:14.759 NotebookApp] 0 active kernels
[I 01:48:14.759 NotebookApp] The Jupyter Notebook is running at:
[I 01:48:14.760 NotebookApp] http://localhost:8889/?token=605b46819a7dd5e99d71a07c7f3a53ea4a789b62c6c38764
[I 01:48:14.760 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 01:48:14.761 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8889/?token=605b46819a7dd5e99d71a07c7f3a53ea4a789b62c6c38764
[I 01:48:22.437 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1

下面这种方式,也是可以打开notebook

kxlc-t@ubuntu:~$ ipython notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future
[I 01:49:43.605 NotebookApp] The port 8888 is already in use, trying another port.
[I 01:49:43.863 NotebookApp] JupyterLab beta preview extension loaded from /home/kxlc-t/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 01:49:43.864 NotebookApp] JupyterLab application directory is /home/kxlc-t/anaconda3/share/jupyter/lab
[I 01:49:43.944 NotebookApp] Serving notebooks from local directory: /home/kxlc-t
[I 01:49:43.945 NotebookApp] 0 active kernels
[I 01:49:43.945 NotebookApp] The Jupyter Notebook is running at:
[I 01:49:43.945 NotebookApp] http://localhost:8889/?token=7b1a5b2aa3103031569783144f91b92c7dcd8d4c600fa58f
[I 01:49:43.945 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 01:49:43.947 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8889/?token=7b1a5b2aa3103031569783144f91b92c7dcd8d4c600fa58f
[I 01:49:49.516 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1

 

posted @ 2018-04-17 16:52  玲珑醉  阅读(19664)  评论(0编辑  收藏  举报