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中显示的环境名称
相关推荐
米高梅狮子3 小时前
03.网络类服务实践
linux·运维·服务器·网络·kubernetes·centos·openstack
June`4 小时前
网络编程时内核究竟做了什么???
linux·服务器·网络
楼兰公子4 小时前
RK3588 + Linux7.0.3 网络工程调试错误速查手册
linux·网络·3588
Elnaij4 小时前
Linux系统与系统编程(9)——自设计shell与基础IO
linux·服务器
IMPYLH5 小时前
Linux 的 unexpand 命令
linux·运维·服务器·bash
|_⊙6 小时前
Linux 文件知识 补充
linux·运维·服务器
落羽的落羽6 小时前
【算法札记】练习 | Week4
linux·服务器·数据结构·c++·人工智能·算法·动态规划
Mortalbreeze6 小时前
深度理解文件系统 ---- 从磁盘存储到内核存储
大数据·linux·数据库
LN花开富贵9 小时前
Ubuntu aarch64 架构安装 NoMachine 远程控制 避坑与实战
linux·运维·笔记·学习·ubuntu·嵌入式
取经蜗牛9 小时前
Windows 11 WSL + Ubuntu 24.04 安装指南
linux·windows·ubuntu