创建配置
./jupyter notebook --generate-config --allow-root
生成密码
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:558eb1784760:f658abada54f87cbe25d8c6fc096119d59ff0e50'
修改配置文件:
cat /root/.jupyter/jupyter_notebook_config.py |grep -Ev "^#|^$"
c.NotebookApp.allow_root = True
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.notebook_dir = u'/var/code/python'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:558eb1784760:f658abada54f87cbe25d8c6fc096119d59ff0e50'
c.NotebookApp.port = 18888
安装插件:
pip3 install jupyter_contrib_nbextensions -i http://pypi.douban.com/simple
jupyter contrib nbextension install --user
运行:
jupyter notebook
阅读(1785) | 评论(0) | 转发(0) |