【问题标题】:PyCharm: Cannot find reference 'Gtk' in '__init__.py'PyCharm:在“__init__.py”中找不到引用“Gtk”
【发布时间】:2020-04-30 16:50:13
【问题描述】:

我有一个干净的虚拟环境

conda create --name gtk python=3.8

conda install -c conda-forge pygobject gtk3

当我根据PyGTK3 wiki 添加导入from gi.repository import Gtk 时。

PyCharm 抱怨说Cannot find reference 'Gtk' in '__init__.py'

【问题讨论】:

    标签: python-3.x pycharm pygobject


    【解决方案1】:

    PyCharm 提供了一个自动修复 'Generate stubs for binary module' 来修复这个问题。

    【讨论】:

      猜你喜欢
      • 2021-10-10
      • 2014-06-08
      • 1970-01-01
      • 2018-06-30
      • 2022-01-01
      • 2015-02-24
      • 2016-04-17
      • 1970-01-01
      • 2017-12-01
      相关资源
      最近更新 更多