pytorch环境下python文件正常调用GPU,jupyter无法调用GPU
解决方法:
第一步 查看之前的内核位置
jupyter kernelspec list
第二步 删除之前的内核
jupyter kernelspec remove ‘你的内核名称’
我这里是jupyter kernelspec remove python3
第三步 安装nb_conda_kernels包,自动把虚拟环境下的python生成内核
conda install nb_conda_kernels
等待安装完成
测试 成功调用cuda