Jupyter notebook 局域网服务器配置
生成配置文件
打开终端,运行以下命令
jupyter notebook --generate-config
linux 下生成的文件在:
~/.jupyter/jupyter_notebook_config.py
~ 是你的HOME 目录。
windows 生成的文件在:
C:\Users\USERNAME\.jupyter\jupyter_notebook_config.py
如果这个目录有jupyter_notebook_config.json
文件,把它删除,它的优先级.py
结尾的配置文件高。
设置密码:
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:1227f56beef9:7bd824901b3b8e3f4cb41c4561679e450dcafc77'
输入你自己的密码,我这里输入的是我的名字。
打开 ~/.jupyter/jupyter_notebook_config.py
,找到以下语句并修改:
c.NotebookApp.password = u'sha1:1227f56beef9:7bd824901b3b8e3f4cb41c4561679e450dcafc77'
<