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中显示的环境名称
相关推荐
Brilliantwxx2 小时前
【Linux】 进程(10) 进程控制深度解析:创建、终止与等待
linux·运维·服务器·c语言·开发语言·网络
欧米欧2 小时前
Linux基础指令上
linux·运维·服务器
ARM|X86+FPGA工业主板厂家3 小时前
基于嵌入式 GPU 的智能服务机器人
linux·运维·arm开发·fpga开发·机器人
sulikey4 小时前
Linux 粘滞位(Sticky Bit)完全指南:为什么共享目录需要“防删除“?
linux·服务器
mengge.cloud4 小时前
网络技术基础小白教程
linux·服务器·网络·云计算
学代码的CJY4 小时前
Linux 重定向、管道与环境变量
linux·spring boot·spring
treacle田4 小时前
达梦数据库-Linux DM数据守护主备集群缩改为单机-记录总结
linux·服务器·数据库·主备集群改单机
IT大白鼠5 小时前
CentOS 7.9 自建 Yum 源服务器搭建指南
linux·服务器·centos
高亦真5 小时前
今天是学习嵌入式的第34天
linux·学习·算法
cuijiecheng20186 小时前
从 GinormoTime 到 Rocky Linux:25fps LTC 完整搭建与验证实战
linux·运维·服务器