1.下载:
在anaconda的指定环境中
conda install nb_conda_kernels
2.打开
在anaconda指定环境中使用命令:
jupyter notebook
3.输入指令后,会显示如下,根据显示地址打开


- 在右边的new按钮处,选择相应环境,我的虚拟环境是study,所以选择conda env:study

点击后会自动跳转页面

3.运行测试
我输入了
import torch

使用 shift+enter,运行代码,并显示下一行
运行成功后,In[ ]中会有数字
torch.cuda.is_available()
打印
