使用pycharm调用模块后字体变灰

图片说明

点击小灯泡提示出现以下内容: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 class-level items are supported better than instance items.

上面大致意思:

import 不能识别自定义包名,该类或者包没有灌入python引入库中

 

解决方法:

File下有invalidate caches/restart选项,点击即可

如果不行使用

解决方案:右击pycharm中项目名-->Mark Directory as -->Resource root

posted @ 2018-08-21 10:48  莫失莫忘csbh  阅读(4424)  评论(0编辑  收藏  举报