【经验总结】Jupyter 配置内核

1. 背景描述

使用 国家超算互联网中心 的服务器,创建

jupyterlab 容器,想在之前 conda 创建的环境中运行,可是不行,进入容器就直接进入 jupyterlab

2. 解决方法

配置内核

2.1 激活环境

bash 复制代码
conda activate peft

2.2 安装内核

bash 复制代码
pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install ipywidgets -i https://pypi.tuna.tsinghua.edu.cn/simple

2.3 添加内核

bash 复制代码
~$ python -m ipykernel install --user --name=peft  --display-name peft
Installed kernelspec peft in /public/home/acc5trotmy/.local/share/jupyter/kernels/peft

查看内核

bash 复制代码
$ jupyter kernelspec list
Available kernels:
  python3    /public/home/acc5trotmy/.conda/envs/peft/share/jupyter/kernels/python3
  peft       /public/home/acc5trotmy/.local/share/jupyter/kernels/peft

此时启动页有了 peft 内核

3. 使用内核

打开任意 .ipynb 的python 代码,在右上方小甲虫旁边 选择内核

相关推荐
helloweilei9 小时前
python 抽象基类
python
用户8356290780519 小时前
Python 实现 PPT 转 HTML
后端·python
zone773915 小时前
004:RAG 入门-LangChain读取PDF
后端·python·面试
zone773915 小时前
005:RAG 入门-LangChain读取表格数据
后端·python·agent
树獭非懒1 天前
AI大模型小白手册|Embedding 与向量数据库
后端·python·llm
唐叔在学习1 天前
就算没有服务器,我照样能够同步数据
后端·python·程序员
曲幽1 天前
FastAPI流式输出实战与避坑指南:让AI像人一样“边想边说”
python·ai·fastapi·web·stream·chat·async·generator·ollama
Flittly1 天前
【从零手写 AI Agent:learn-claude-code 项目实战笔记】(1)The Agent Loop (智能体循环)
python·agent
vivo互联网技术1 天前
ICLR2026 | 视频虚化新突破!Any-to-Bokeh 一键生成电影感连贯效果
人工智能·python·深度学习