搭建自己的Jupyter Notebook服务

一、jupyter notebook安装

pip install jupyter

二、生成密码hash值

1.使用jupyter命令生成:

jupyter notebook password

创建密码后hash值保存在/root/.jupyter/jupyter_notebook_config.json里

2.使用IPython生成:

搭建自己的Jupyter Notebook服务_第1张图片

创建密码后生成hash值

三、创建jupyter配置文件

自定义配置文件为:/etc/jupyter_config.py

c.NotebookApp.ip = '*'  
c.NotebookApp.open_browser = False  
c.NotebookApp.port = 8888  
c.NotebookApp.password = u'sha1:9ee6#############' #填入上一步生成的hash值  
c.NotebookApp.notebook_dir = '/jupyter'

四、启动jupyter

jupyter notebook --config=/etc/jupyter_config.py --allow-root

五、安装扩展nbextensions

1.安装pip包

pip install jupyter_contrib_nbextensions

2.安装js和css文件

jupyter contrib nbextensions install --user

3.重启jupyter notebook服务

重启服务后登陆jupyter notebook可对nbextensions进行设置

你可能感兴趣的:(搭建自己的Jupyter Notebook服务)