This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and c
import 不能识别自定义包名,该类或者包没有灌入python引入库中
解决方案:右击pycharm中项目名-->Mark Directory as -->Resource root,然后重新打开项目红线就消失了
意思:自定义的资源加入到该项目中,这样才能被 import 识别
本文分享自 作者个人站点/博客 前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体分享计划 ,欢迎热爱写作的你一起参与!