I cannot make Python3 work with GTK3. I'm in a cluster context and I had everything recompiled from the sources.
When I run a simple example :
from gi.repository import Gtk
win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
I have the following error :
ERROR:root:Could not find any typelib for Gtk
Traceback (most recent call last):
File "gtk3_example.py", line 2, in
from gi.repository import Gtk
ImportError: cannot import name 'Gtk'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…