使用Python脚本打开文件夹后,在同一个文件夹中导入脚本的文件夹将被标记为Import xxx could not be resolved Pylance(reportMissingImports)。但是,导入是存在的,代码运行时没有错误。导入库模块不会被标记为错误。
将Python > Analysis: Extra Paths设置为.没有帮助。
我正在学习用python编写代码和导入我自己的模块。模块位于同一个目录中。这是我的密码:from test import hallo,myAge,myDriver,FahrzeugImport "person" could not be resolved Pylance(reportMissingImports) [2,6]
如果我运行这个程序,该程序将仍然工作