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 識別
写评论
很抱歉,必須登入網站才能發佈留言。