使用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

相关文章:

  • 2021-11-22
  • 2021-09-13
  • 2021-08-23
  • 2022-12-23
  • 2021-12-13
  • 2022-01-24
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2021-05-16
  • 2022-12-23
  • 2021-09-11
  • 2022-01-17
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案