Import [your_module] could not be resolved Pylance(reportMissingImports)解决方案)
转载自:
VS Code中Import [module] could not be resolved Pylance(reportMissingImports)解决方案
在VS Code中编写python文件时,import自定义module报错 “could not be resolved Pylance(reportMissingImports)”。
这是因为
Pylance未找到自定义模块的地址,可以通过在settings.json文件中添加extraPaths来解决:
1.通过Shift+Ctrl+P打开设置栏,输入settings后找到Perference: Open Settings (JSON)