主要重点:
把配置设置中的c.ServerApp.password
改为调用c.PasswordIdentityProvider.hashed_password
,以符合官方的要求
-
安装Anaconda将自动安装好jupyter,包括notebook和lab
-
安装Node
安装Node.js的目的是在登录时有更有好的界面。
linux安装Node.js教程 -
生成配置文件
$ jupyter notebook --generate-config Writing default config to: ~/.jupyter/jupyter_notebook_config.py
虽然是notebook的配置文件,但是实测lab也通用,如果没有反应,可以考虑使用
jupyter lab --generate-config
-
设置密码
li@lab:~$ python >>>from jupyter_server.auth import passwd; >>>passwd() Enter password: Verify password: 'argon2:$argon2id$v=19$m=10240,t=10,p=8$yb6aBw2p5is+gReTnMuxxxxxxxxxxxxxxxx'
记住生成的秘钥,形如:
argon2:$argon2id$v=19$m=102