在anaconda发行版的jupyter笔记本中运行this code。我已经在anaconda中安装了gobject-introspection
,pygobject
软件包。运行代码时出现此导入错误。任何形式的帮助将不胜感激。
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
win = Gtk.Window()
win.connect("destroy", Gtk.main_quit)
win.show()
Gtk.main()
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-87-c31ab9206da1> in <module>
----> 1 import gi
2 gi.require_version('Gtk', '3.0')
3 from gi.repository import Gtk
4
5 win = Gtk.Window()
~\Anaconda3\lib\site-packages\gi\__init__.py in <module>
40
41
---> 42 from . import _gi
43 from ._gi import _API
44 from ._gi import Repository
ImportError: DLL load failed: The specified procedure could not be found.
答案 0 :(得分:0)
您安装了必需的东西吗?我不确定这是什么意思,但这也许可以帮助您:
安装系统提供的PyGObject:
使用pip从PyPI安装: