终端运行,输入新的密码即可
jupyter notebook password
不过以上方法会在运行jupyter时报冲突错误 ,但并不影响运行
Collisions detected in /Users/xiangsong/.jupyter/jupyter_notebook_config.py and /Users/xiangsong/.jupyter/jupyter_notebook_config.json config files.
/Users/xiangsong/.jupyter/jupyter_notebook_config.json has higher priority:
原因是 我们只修改了.json文件并没有修改jupyter_notebook_config.py
在/Users/xiangsong/.jupyter/jupyter_notebook_config.py中修改passwd
c.NotebookApp.password = u'sha1:5cdf89657916:0bafe07b6f670a32c1af2ba7f0889ced16ad9eb4'
from notebook.auth import passwd
passwd()
#输入密码 生成sh1 再修改/Users/xiangsong/.jupyter/jupyter_notebook_config.json和.py文件里面的passwd
#"NotebookApp": {
# "password": "'sha1:830042e7bd1b:0dcd40758758c52baa9190ffd7fbb669af92ec06'
#}
#中的sha1