在centos7 下安装Anaconda 启动jupyter notebook

1.下载
https://www.anaconda.com/download/#linux
2.安装python

# bash Anaconda3-5.0.1-Linux-x86_64.sh

选择默认安装路径:linux

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

安装中其余选项都选 yescentos

Thank you for installing Anaconda3!

****安装完毕***
使生效:浏览器

# source ~/.bashrc

3.手动设置密码:bash

# python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'
>>>

'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'这一串就是要在 jupyter_notebook_config.py 添加的密码。服务器

c.NotebookApp.password = u'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'

4.修改配置文件:
在 /root/.jupyter/jupyter_notebook_config.py中找到下面的行,取消注释并修改。ide

c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:a5...刚才复制的那个密文'
c.NotebookApp.open_browser = True
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口

以上设置完之后就能够在服务器上启动 jupyter notebook,root 用户使用 jupyter notebook --allow-root。浏览器打开 IP:指定的端口, 输入密码就能够访问了。
后台启动:this

#nohup jupyter notebook --allow-root&

如图:
在centos7 下安装Anaconda 启动jupyter notebookcentos7

相关文章
相关标签/搜索