Vscode——报错解决:Import “torch“ could not be resolved

一、原因

当前解释器环境中,没安装torch库

二、解决办法

前提:已经安装PyTorch环境

1、键盘上按快捷键:Ctrl + shift + P

2、输入:Python:Select Interpreter

3、选择PyTorch解释器Vscode——报错解决:Import “torch“ could not be resolved_第1张图片

你可能感兴趣的:(编程软件,vscode,pytorch)