python代码导入本地文件时,模块下方出现红色波浪线,两步解决 现象步骤步骤一步骤二 现象 步骤 步骤一 File → Settings→ Build, Execution, Deployment → Console → Python Console 步骤二 右键项目目录,找到“Mark Directory as”为“Sources Root”,,直接上图不多说: 选定Sources Root之后,返回查看,解决问题。