I run a python application which uses a glade builder file for its GUI. I recently migrated to a KDE desktop (Debian Wheezy). After installing the Gtk bindings with apt (gir1.2-gtk-3.0) I tried to following error message when starting the Python code:
gi._glib.GError: XXX.glade: required gtk+ version 3.10, current version is 3.4
How could I best solve this?
Do I need to downgrade Gtk from 3.4 to 3.1? And if yes how do I do that? How do I find version 3.10 in the repositories?
Or is something wrongly configured? Maybe the Gtk version being fixed in the glade file which I imported from a different system, whose Gtk version might have been different (do not remember)?
Or any other suggestions?
I do not think source code is helpful in this matter, as the problem most likely is located outside of it, nonetheless some extract from it:
from gi.repository import Gtk, GObject, GLib
wTree = Gtk.Builder()
class Test_GUI:
def __init__(self):
self.builder = Gtk.Builder()
self.builder.add_from_file("XXX.glade")
self.window = self.builder.get_object("MainScreen")
self.window.show_all()
OK, the solution was to recompile the .glade builder file. Somehow the version conflict was that the glade file was created on a different system than it got used at.
Can you tell us wich program you try to use ? Can you Modify the source code to fit with your Gtk version ? Does it work ?
The upgrade from Gtk 3.4 to 3.10 is not possible (with aptitude or apt-get); Gtk 3.10 can't be found in the official repository of debian (correct me if i'm wrong), see this link However you can install a later unstable version, see this link (It's not recommand too).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.