Jupyter

快速启动

执行命令:

$ jupyter notebook --ip=0.0.0.0 --port=8888 --NotebookApp.token=

生成缺省配置文件

执行命令:

$ jupyter  notebook --generate-config

则会生成缺省配置文件:~/./jupyter/jupyter_notebook_config.py,可对此文件进行个性化定义

使用自定义配置文件

$ jupyter  notebook --config=<path_to_my_jupyter_notebook_config.py>

Set password

  • 执行如下python代码,得到密码串:

from IPython.lib import passwd
print(passwd("123456"))
  • 修改文件jupyter_notebook_config.py:

c.NotebookApp.password = u'sha1:a593e41277c6:322e9d1013f9d513ca941f49973812e9bac73bd3'

修改jupyter的WEB URL前缀

  • 修改文件jupyter_notebook_config.py:

c.NotebookApp.base_url = '/nb/'
c.NotebookApp.webapp_settings = {'static_url_prefix':'/nb/static/'}

参考文档:

  • https://nbviewer.jupyter.org/github/ipython/ipython/blob/3.x/examples/Notebook/Configuring%20the%20Notebook%20and%20Server.ipynb