解决Pycharm无法导入自定义包问题

报错:

无法解析的引用 'settings 更少… (Ctrl+F1)
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.

并不影响程序的正常运行,但pycharm有下波浪线

解决:

在pycharm中设置source路径

file–>setting–>project:server–>project structure

将放package的文件夹设置为source,这样import的模块类等,就是通过这些source文件夹作为根路径来查找,也就是在这些source文件夹中查找import的东西。

无法解析的引用 'settings 更少... (Ctrl+F1) This inspection detects names that should resolve but don't. Due

相关文章:

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