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中显示的环境名称
相关推荐
yueguangni5 小时前
centos7虚拟机nat模式连接不上xshell方法分享
linux·运维·服务器
wadesir5 小时前
解决VSCodeServer在CentOS 7上运行问题:glibc 2.17升级与内核优化指南(2025最新版)
linux·运维·centos
Hello_wshuo5 小时前
锅炉温控系统优化
linux·python·物联网
HuaYi_Sir6 小时前
i.MX6ULL移植uboot Linux buildroot(二)
linux·运维·服务器
小鹏linux6 小时前
【像素贪吃蛇小游戏】部署文档-linux篇
linux·运维·服务器
DD-WL7 小时前
PKI&&数字证书相关概念
linux·网络协议
路溪非溪7 小时前
Linux驱动中的红外遥控子系统
linux·arm开发·驱动开发
成都犀牛7 小时前
Ubuntu配置nginx
linux·nginx·ubuntu
qdprobot7 小时前
开源的在线串口调试助手支持macOS苹果电脑Windows系统Linux 浏览器webSerial
linux·运维·服务器·人工智能·mixly·小智ai·webserial
wdfk_prog7 小时前
[Linux]学习笔记系列 -- [fs]namespace
linux·笔记·学习