jupyterlab安装

  1. 准备

  1. 搭建虚拟环境
python -m venv venv
  1. jupterlab安装
pip install jupterlab==4.0.9
  1. 配置

  1. 生成配置密钥
(venv) (base) [nlu_common@test-node-22 binger]$ ipython
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.19.0 -- An enhanced Interactive Python. Type '?' for help.
 
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
输入密码(用于登录jupter notebook),将生成的加密后的密钥保存下来。
  1. 生成默认配置文件
jupyter lab --generate-config
  1. 修改配置文件
vim ~/.jupyter/jupyter_lab_config.py
c.ServerApp.ip = '*'
c.ServerApp.password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$RTeibHvXSu9VGh7dW+mCDw$clLTSQgm5p+9/CCWEHykSKGoDCKLikzsp2eRRkAXTnA'
c.ServerApp.open_browser = False
c.ServerApp.open_brower = False
c.ServerApp.port = 11111
c.ServerApp.allow_remote_access = True
c.ServerApp.notebook_dir = '/data/binger'
  1. 启动

  • ip + 1111(端口)
  • 使用设置的密码登录
  1. 其他

  1. 中文语言包支持:

pip install jupyterlab-language-pack-zh-CN
  1. 代码补全工具

pip install nodejs jupyter-lsp python-lsp-server[all]
 
 
posted @ 2024-01-03 10:06  binger0712  阅读(96)  评论(0)    收藏  举报