PyCharm引入自定义类报错

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xiaoshunzi111/article/details/78500100


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引入库中


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


意思:自定义的资源加入到该项目中,这样才能被 import 识别


展开阅读全文

没有更多推荐了,返回首页