搭建自己的Jupyter Notebook服务

一、jupyter notebook安装

pip install jupyter

二、生成密码hash值

1.使用jupyter命令生成:

jupyter notebook password

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

2.使用IPython生成:

创建密码后生成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进行设置

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容