JupyterLab
是一个交互式的开发环境,是Jupyter Notebook
的下一代产品,集成了更多的功能。使用JupyterLab
,能够以灵活,集成和可扩展的方式处理文档和活动:
- 可以开启终端,用于交互式运行代码,完全支持丰富的输出
- 支持Markdown,Python,R,LaTeX等任何文本文件
- 增强notebook功能
- 更多插件支持
安装:
- jupyterlab中的有些组件需要依赖node.js,先安装node.js
- 虚拟环境
pip install jupyterlab
- 如果使用云服务器远程部署,需要安全密码:
# 进入ipython交互环境
ipython
# 输入
from notebook.auth import passwd
passwd()
# 输入设置登录JupyterLab界面的密码,复制输出
- 修改JupyterLab 配置文件:
jupyter lab --generate-config
c.NotebookApp.ip = '127.0.0.1'
c.NotebookApp.allow_root = True
c.NotebookApp.open_browser = False:
c.NotebookApp.password = '上面生成的字符串'
- 启动
jupyter-lab >/dev/null 2>&1 &
- Nginx配置
location ^~ /jupyter/ {
proxy_pass http://127.0.0.1:8888/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_redirect off;
}
- 访问