jupyter重置密码

少年恃险若平地,独倚长剑凌清秋。这篇文章主要讲述jupyter重置密码相关的知识,希望能为你提供帮助。
今天突然发现服务器jupyter用不了,赶紧登上服务器看看:
1、进程不见了,怀疑跟上次干掉挖矿程序之后的重启有关系。重启服务

"NotebookApp":
"password": "sha1:809066e2a829:f63f421f03d4fc686becf912dae9a2c2b9a49e44 ignored, using sha1:a585320f77a1:1b0731ef0e6be1f2fa9fdbf6bb6620c87f84b839"


[W 14:51:50.505 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 14:51:50.507 NotebookApp] Error loading server extension jupyter_nbextensions_configurator
Traceback (most recent call last):
File "/root/anaconda3/envs/jupyter_notebook/lib/python3.7/site-packages/notebook/notebookapp.py", line 2027, in init_server_extensions
mod = importlib.import_module(modulename)
File "/root/anaconda3/envs/jupyter_notebook/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "< frozen importlib._bootstrap> ", line 1006, in _gcd_import
File "< frozen importlib._bootstrap> ", line 983, in _find_and_load
File "< frozen importlib._bootstrap> ", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named jupyter_nbextensions_configurator
[W 14:51:50.508 NotebookApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "/root/anaconda3/envs/jupyter_notebook/lib/python3.7/site-packages/notebook/notebookapp.py", line 2027, in init_server_extensions
mod = importlib.import_module(modulename)
File "/root/anaconda3/envs/jupyter_notebook/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "< frozen importlib._bootstrap> ", line 1006, in _gcd_import
File "< frozen importlib._bootstrap> ", line 983, in _find_and_load
File "< frozen importlib._bootstrap> ", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named jupyterlab
[I 14:51:50.509 NotebookApp] Serving notebooks from local directory: /root
[I 14:51:50.509 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 14:51:50.509 NotebookApp] http://iz8vb2itl4nivaihngw441z:8888/
[I 14:51:50.509 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

上面有两个报错,说是XXX模块找不到,但是启动起来了!因为我们是做开发调试用的,暂且没管那俩报错
2、jupyter的密码忘了,使用以下方法重置:
[root@iz8vb2itl4nivaihngw441z .jupyter]# jupyter notebook password
Enter password:
Verify password:
[NotebookPasswordApp] Wrote hashed password to /root/.jupyter/jupyter_notebook_config.json

3、重启jupyter服务
nohup /root/anaconda3/envs/jupyter_notebook/bin/python /root/anaconda3/envs/jupyter_notebook/bin/jupyter-notebook --allow-root &

【jupyter重置密码】4、浏览器可以访问了

    推荐阅读