服务器配置jupyter notebook/jupyter lab,写入密码报错:
>>> from notebook.auth import passwd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'notebook.auth'
原因是:jupyter notebook 7以后不再用notebook.auth. 使用jupyter_server.auth 替代notebook.auth
:
jupyter server password
Enter password: ****
Verify password: ****
or ipython:
from jupyter_server.auth import passwd
passwd()
配置完成后,服务器端开启jupyter后,本地客户端cmd运行下述命令
ssh -L 6110:127.0.0.1:6110 your_username@服务器地址
浏览器输入http://127.0.0.1:6110/lab即可打开
pycharm,连接输入密码也可连接