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中显示的环境名称
相关推荐
SCandL15210 分钟前
安全上下文的修改实验
linux
ragnwang15 分钟前
Ubuntu /home 分区安全扩容教程
linux·运维·ubuntu
Azure++23 分钟前
Centos安装clickhouse
linux·clickhouse·centos
濊繵23 分钟前
Linux网络--应用层自定义协议与序列化
linux·服务器·网络
缘友一世1 小时前
jupyter lab公开访问配置方法小记
chrome·jupyter
qq_203769491 小时前
在conda环境中使用jupyter
python·jupyter·conda
潇凝子潇1 小时前
Linux 服务器实时监控Shell 脚本
linux·服务器·chrome
顾安r1 小时前
11.21 脚本 网页优化
linux·前端·javascript·算法·html
last demo1 小时前
iscsi服务器
linux·运维·服务器·php