dcalmeida
dcalmeida

Reputation: 403

"required gtk+ version 3.10, current version is 2.24" - Glade+Python 2.7

I want to use Glade Interface Designer with Python 2.7, but when I try to run my code I get the following error:

:required gtk+ version 3.10, current version is 2.24

I have the gtk+ 3.10 installed, but I don't know how to change the path to use the 3.10 version.

I'm using Ubuntu 14.04 LTS.

Upvotes: 1

Views: 3382

Answers (2)

liberforce
liberforce

Reputation: 11454

import gtk is for GTK2 with pyGTK. If you want to code in python for GTK3, you'll need:

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

Read The Python GTK+ 3 Tutorial.

Upvotes: 2

andlabs
andlabs

Reputation: 11588

You are using PyGTK, which is only for GTK+ 2. Switch to python-gobject, which allows using GTK+ 3. Coding with it seems to be very similar to coding with PyGTK, so migrating your code shouldn't be too hard.

Upvotes: 1

Related Questions