前提:服务器中已安装conda或miniconda
- 创建虚拟环境
# 创建虚拟环境 conda create -n p110p36 python=3.6 # 进入虚拟环境 conda activate p110p36
- 安装jupyterlab
pip install jupyterlab
- 生成配置文件
jupyter server --generate-config ##加入以下数据 c.NotebookApp.allow_root =True c.NotebookApp.open_browser =False #不需要设置密码可省略 c.NotebookApp.password = hash值
- 设置登录密码
jupyter server password
- 运行jupyterlab
jupyter lab
- windows打开jupyter界面
# windows浏览器输入如下内容 服务器ip:端口
- jupyterlab中添加多个虚拟环境
# 确保已创建好另外一个conda虚拟环境p112p39,并进入虚拟环境 # 安装ipykernel pip install ipykernel # jupyter安装内核 python -m ipykernel install --user --name=p112p39 --display-name "p112p39" # 查看jupyterlab kernel jupyter kernelspec list # 删除内核 jupyter kernelspec remove kernelname