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中显示的环境名称
相关推荐
坚持就完事了2 小时前
Linux中如何添加环境变量
linux·运维·服务器
l1t3 小时前
mingw和Linux中的gcc和llvm编译器编译的pocketpy执行同一个python脚本的不同效果
linux·运维·python
白緢4 小时前
一、Linux 基础入门
linux·运维·服务器
菜菜艾4 小时前
自动化环境补丁更新系统
linux·运维·bash·运维开发
HalvmånEver4 小时前
MySQL的索引
android·linux·数据库·学习·mysql
wljy17 小时前
二、静态库的制作和使用
linux·c语言·开发语言·c++
mzhan0177 小时前
Linux: coredump产生对程序退出的影响
linux·运维·服务器
光电笑映7 小时前
从环境变量到进程虚拟地址空间——Linux 内存管理的底层脉络
linux·服务器·c++·c
源远流长jerry7 小时前
Linux 网络收包机制:从网卡到 Socket 的完整路径
linux·运维·服务器·网络·网络协议·tcp/ip
杰 .9 小时前
Linux工具使用
linux·服务器