# 安装Jupyter
pip install jupyter
# 生成默认配置文件
jupyter notebook --generate-config
# 生成密钥
python
>>>from notebook.auth import passwd
>>>passwd()
Enter password:
Verify password:
'<密钥内容>'
>>>quit()
~/.jupyter/jupyter_notebook_config.py
%Userprofile%\.jupyter\jupyter_notebook_config.py
c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = '<密钥内容>'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
# import webbrowser
# webbrowser.register(‘chrome', None, webbrowser.GenericBrowser(u'C:\Program Files(x86)\Google\Chrome\Application\chrome.exe'))
# c.NotebookApp.browser = ‘chrome'
启动:
jupyter notebook