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 小时前
Ubuntu_24.04 安装OpenClaw教程
linux·ubuntu
laocui12 小时前
树莓派Ubuntu系统安装openclow(豆包+QQ机器人)
linux·运维·ubuntu
qq_24218863323 小时前
快速搭建跨环境检测服务的步骤
linux·开发语言·windows·python·macos
Trouvaille ~3 小时前
【Linux】网络进阶:NAT技术与代理服务器详解
linux·运维·网络·nginx·ip·nat·代理服务器
Codefengfeng4 小时前
binwalk提取文件时无输出文件夹(kali-linux环境)
linux·运维·服务器
好好学习天天向上~~4 小时前
11_Linux学习总结_环境变量
linux·学习
EmbedLinX5 小时前
嵌入式Linux根文件系统制作与移植
linux·服务器·笔记·学习
阿猿收手吧!5 小时前
【Linux/C++】线程切换与协程切换,协程池
linux·c++
袁袁袁袁满6 小时前
Linux网络连接之ss命令详细使用指南(从入门到运维实战)
linux·运维·服务器·网络·ssh·网络连接·ss命令
未来之窗软件服务6 小时前
服务器运维(四十一)日服务器linux-audit.log分析工具—东方仙盟
linux·运维·服务器·服务器运维·仙盟创梦ide·东方仙盟