在某虚拟环境内安装torch,但是ipyn文件保存后无法正常导入torch
1.conda环境下安装Jupyter等一切配置,进入虚拟环境
2.
conda install nb_conda_kernels
3.安装完成后重新打开VSCode,在运行Jupyter notebook中的代码之前,在右上角的Select Kernel中切换到test
中的Kernel,即可成功导入Pytorch。

在某虚拟环境内安装torch,但是ipyn文件保存后无法正常导入torch
1.conda环境下安装Jupyter等一切配置,进入虚拟环境
2.
conda install nb_conda_kernels
3.安装完成后重新打开VSCode,在运行Jupyter notebook中的代码之前,在右上角的Select Kernel中切换到test
中的Kernel,即可成功导入Pytorch。