1. 命令行 jupyter notebook --generate-config
记住输出的文件位置 ..../jupyter_notebook_config.py
2. 修改jupyter_notebook_config.py
找到c.NotebookApp.allow_password_change(或是password相关的允许修改栏)修改为False
3.命令行 jupyter notebook password
输入新密码并确认
4.在生成的jupyter_notebook_config.json文件中复制密码粘贴到jupyter_notebook_config.py中对应的c.NotebookApp.password中
ok!