VSCODE运行时报错,无法从源解析导入“requests”PylancereportMissingModuleSource...
1、查看pythone版本
命令行输入:python --version
2、Visual Studio Code
-
打开命令面板(
Ctrl+Shift+P
或Cmd+Shift+P
)。 -
输入并选择
Python: Select Interpreter
。 -
从列表中选择正确的 Python 解释器,该解释器应该与你的 pip 安装的 Python 版本相对应。