#create pytorch env
#进入 pytorch 环境
conda activate pytorch-name
# 安装jupyter notebook
# 安装ipykernel 用于安装kernel
conda install ipykernel
# 添加kernel进 jupyter notebook
python -m ipykernel install --user --name pytorch --display-name "Python_GPU"
# 查看kernel list 确认是否安装成功
jupyter kernelspec list
![](https://i-blog.csdnimg.cn/blog_migrate/ff0c5a8f0d5d8ec052199fd29d862c4f.png)
上图表明安装kernel成功,可以自由切换kernel了