- 安装autoimport后无法自动提示导入包
解决:文件——>首选项——>设置,在设置里找到“settings.json中编辑“字样,点击进去配置:“python.analysis.indexing”: true, 保存并退出,重启即可
- 在miniconda中创建不同的python环境
①conda create -n python39 python=3.9
②安装cuda版本的pytorch
俺的显卡与驱动

核对对应的cuda版本
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
Table 3. CUDA Toolkit and Corresponding Driver Versions
conda prompt中敲
conda activate python39
在pytorch官网无脑复制指令安装
进入python --> import torch --> torch.cuda.is_available() 返回true就可以啦!