【2】jupyter lab切换anaconda虚拟环境配置说明

场景

如果你的Linux系统安装好jupyter和anaconda,并且只希望服务器只安装这一个jupyter,anaconda虚拟环境中不想再另外安装jupyter。但同时又希望jupyter能够在anaconda不同的虚拟环境中切换使用。

Jupyter、IPyKernel 与 IPython 之间的关系和数据流向

操作系统/运行时
内核执行层
内核通信协议
用户前端层
依赖并使用
Jupyter Lab
Jupyter Notebook
VS Code / Jupyter Console
Jupyter 协议

(WebSocket / ZMQ)
IPyKernel

Python 内核实现
IPython

增强型 REPL / 核心功能
Python 解释器

运行时数据流(时序图)
Python 解释器 IPython (核心) IPyKernel Jupyter 前端 Python 解释器 IPython (核心) IPyKernel Jupyter 前端 发送代码块 (via Jupyter 协议) 调用执行函数 (如 run_cell) 编译/执行代码 返回结果 & 输出 返回富输出对象 发送输出消息 (stdout, 图像, 错误等)

详细介绍使用参考

jupyter lab

https://blog.csdn.net/yilvqingtai/article/details/147635584

  1. 先了解IPython和IPyKernel简介

  2. 项目安装虚拟环境

  3. 激活/进入虚拟环境

  4. 打开JupyterLab

  5. 切换内核使用虚拟环境

  6. 更改JupyterLab默认工作路径

7.使用anaconda安装的jupyter工具修改默认工作路径

7.1 如果使用anaconda安装后的工具包

7.2 默认虚拟环境base中执行jupyter lab --generate-config

7.3 打开该快捷方式 %USERPROFILE%

  1. 多个虚拟环境如何使用jupyter lab

第一步:在每个A,B,C虚拟环境中都安装ipykernel 内核

第二步:在A虚拟环境中,安装jupyterlab

第三步:在B,C虚拟环境中,注册内核

第四步:在A环境中启动jupyter

第五步:让jupyter外网密码访问,打开指定文件夹 配置

(1)配置访问加密码

(2)配置配置文件

(3)启动访问

相关推荐
程序媛kelly1 天前
如何打开 .md / .ipynb 文件?Markdown 与 Jupyter Notebook 本地预览全攻略
ide·python·jupyter
2601_961875241 天前
花生十三资料1200题|题库|刷题
conda·pytest·pillow·pip·web3.py·ipython·gunicorn
青山如墨雨如画3 天前
【北邮-无线通信中的人工智能】物理层技术中AI的应用实践:基于KNN的调制识别(1)理论基础
人工智能·python·机器学习·matlab·jupyter
love530love4 天前
Anaconda Navigator 升级后图形界面启动失败故障修复实录
人工智能·windows·python·anaconda·navigator
啊森要自信5 天前
【GUI自动化测试】控件、鼠标键盘操作与多场景自动化
c语言·开发语言·python·adb·ipython
gSZrkhJsY6 天前
【无标题】
jupyter·idea
CTA量化套保9 天前
Jupyter Notebook 反复运行天勤策略内存涨:close 与内核习惯
ide·人工智能·python·jupyter
dust_and_stars9 天前
在Ubuntu 24.04上设置Jupyter Notebook远程访问
linux·ubuntu·jupyter
fengchengwu201220 天前
Jupyter 安装与使用指南:从环境配置到效率翻倍
ide·windows·jupyter
葬送的代码人生20 天前
Notebook环境下的List、Slice与LLM大冒险
python·jupyter·api