jupyter | jupyter使用conda虚拟环境

一. 首先创建虚拟环境&&进入到你已经搭建好的虚拟环境中
bash 复制代码
# 创建一个名为jupyter_test的conda虚拟环境
conda create -n jupyter_test python=3.7.5

# 进入/激活虚拟环境
conda activate jupyter_test
二. 安装jupyter(conda自带)和内核, 将环境添加进内核
bash 复制代码
pip install jupyter
pip install ipykernel  # 安装jupyter内核

# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称
三. 移除内核环境
bash 复制代码
jupyter kernelspec remove 环境名
四. 如果conda虚拟环境中第三方包发生了变化,需要将jupyter中的内核环境移除重新进行添加
1. 移除
bash 复制代码
jupyter kernelspec remove 环境名
2. 重新添加
bash 复制代码
# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称
相关推荐
虾..1 天前
Linux 进程等待
linux·运维·服务器
稚辉君.MCA_P8_Java1 天前
DeepSeek Java 多线程打印的19种实现方法
java·linux·jvm·后端·架构
鹿鸣天涯1 天前
使用VMware Workstation 17虚拟机安装红帽企业版系统RHEL10
linux·运维·服务器
杰 .1 天前
Linux yum_and_apt
linux·服务器
南棱笑笑生1 天前
20251129给荣品RD-RK3588开发板跑Rockchip的原厂Buildroot【linux-6.1】系统时适配AP6275P的蓝牙BLE
linux·运维·服务器·rockchip
c***21291 天前
ubuntu 安装 Redis
linux·redis·ubuntu
u***32431 天前
Mysql官网下载Windows、Linux各个版本
linux·数据库·mysql
小鹿学程序1 天前
02-集群节点准备:克隆虚拟机
linux·服务器·apache
boligongzhu1 天前
ubuntu20.04搭建YOLOv11 GPU运行环境
linux·yolo·ubuntu·机器人