jupyter使用conda虚拟环境操作步骤

一.首先进入到你已经搭建好的虚拟环境中

二.安装jupyter(conda自带)和内核,将环境添加进内核

conda install jupyter
conda install ipykernel  # 安装jupyter内核
# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称

三.移除内核环境

jupyter kernelspec remove 环境名

四.如果conda虚拟环境中第三方包发生了变化,需要将jupyter中的内核环境移除重新进行添加

1.移除

jupyter kernelspec remove 环境名

2.重新添加

# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称

你可能感兴趣的:(python学习,jupyter,conda,python)