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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM