ImportError:无法从 gi.repository 导入名称 Gdl

ImportError:无法从 gi.repository 导入名称 Gdl

尝试导入Gnome 对接库我遇到了例外:

ERROR:root:Could not find any typelib for Gdl
...
  from gi.repository import Gtk, Gdk, Gdl
ImportError: cannot import name Gdl

答案1

确保你的系统安装了 gdl-3 包,在 Ubuntu 上:

sudo apt-get install gir1.2-gdl-3

这是 debian.org 上的软件包列表: https://packages.debian.org/search?searchon=contents&keywords=Gdl-3.typelib&mode=path&suite=unstable&arch=any

感谢 irc.gnome.org 上的 nemequ 提供的参考和解决方案。

相关内容