如何在Windows 10上的python 2.7中导入模块gi

时间:2017-10-26 11:49:48

标签: python python-2.7 pygtk

我在编写此代码后导入GTK包时遇到问题:

import gi
gi.require_version('Gtk', '3.0')
from gi import Gtk

win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()

这是结果:

C:\Python27\python.exe C:/Users/83ahmad/PycharmProjects/GTK/1-simple.py
Traceback (most recent call last):
  File "C:/Users/83ahmad/PycharmProjects/GTK/1-simple.py", line 1, in <module>
    import gi
  File "C:\Python27\lib\site-packages\gi\__init__.py", line 42, in <module>
    from . import _gi
ImportError: DLL load failed: The specified procedure could not be found.

Process finished with exit code 1

请帮助我解决这个问题???

0 个答案:

没有答案