【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)启动访问

相关推荐
开开心心就好5 天前
手机虚拟化学实验室,混合燃烧都能模拟
jupyter·智能手机·ffmpeg·计算机外设·电脑·音视频·visual studio
53488736abcdefg9 天前
Anaconda+Jupyter+NumPy
jupyter·numpy·anaconda
weixin_4617694010 天前
VS Code 中创建 Jupyter 文件(.ipynb)
ide·python·jupyter
*wait for?12 天前
利用uv安装python包,并运行jupyter
python·jupyter·uv
程序员清风17 天前
Python 数据分析环境搭建:从 Jupyter 到 pandas
python·jupyter·数据分析
oooost19 天前
Jupyter Notebook 常用快捷键速查
ide·python·jupyter
开开心心_Every19 天前
文件夹批量创建工具支持同级和多层级
运维·服务器·游戏·jupyter·智能手机·pdf·postman
常山云栈23 天前
Anaconda和uv的区别是什么?
python·anaconda·uv
Xiu Yan1 个月前
Python 数据分析:Pandas DataFrame 零基础入门教程
python·jupyter·pycharm·numpy·pandas
Xiu Yan1 个月前
Python 数据分析:Pandas Series 零基础入门教程
python·jupyter·pycharm·numpy·pandas