在服务器上启动jupyterab,开启,jupyterlab
安装jupyterlab:
pip install jupyterlab
生成配置文件,并记下输出的配置文件地址,一般是在 ~/.jupyter/jupyter_notebook_config.py
:
jupyter lab --generate-config
打开python解释器,输入:
from notebook.auth import passwd
passwd()
此时会让你设置密码,设置完成后会得到hash好的密码,将其复制:
'sha1:0d46e59c26c6:caab7b48941bee0095bdcf0747cd2a5a22a27581'
修改配置文件,添加下列配置,其中的密码写入hash好的密码,而不是你设置的密码:
c.NotebookApp.allow_root = True
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.notebook_dir = "/"
c.NotebookApp.open_browser = False
c.NotebookApp.password = "sha1:0d46e59c26c6:caab7b48941bee0095bdcf0747cd2a5a22a27581"
c.NotebookApp.port = 9000
shell内执行下行命令,即可开启jupyter lab:
jupyter lab
在浏览器内输入服务器IP和端口号,输入你之前设置的密码,即可访问jupyter lab。
pip install jupyterlab==3 pip install jupyterlab-language-pack-zh-CN # 安装中文界面 然后设置中文语言就ok