3

I'm designing a GUI python program and I decided to use GTK+3.

Reading some docs here: http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html I know that I could use the gi.repository.Gtk module as API to GTK+3 libs.

But while I'm trying to do so it keeps warning me that it is using the GTK+2 module:

>>> import gi.repository.Gtk
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:47: RuntimeWarning: 
You have imported the Gtk 2.0 module.  Because Gtk 2.0 was not designed 
for use with introspection some of the interfaces and API will fail.
As such this is not supported by the pygobject development team and
we encourage you to port your app to Gtk 3 or greater. PyGTK is the
recomended python module to use with Gtk 2.0
 warnings.warn(warn_msg, RuntimeWarning)

I didn't know how to solve this problem... How could I really turn to using the GTK+3 ?

gpoo
  • 8,408
  • 3
  • 38
  • 53
Chaser hkj
  • 305
  • 1
  • 2
  • 7
  • You use Python bindings for GTK 3. Do you have GTK 3.x installed on your system? Possibly you have GTK 2 installed. – Rostyslav Dzinko Aug 06 '12 at 18:49
  • 1
    Need more info like your OS, probably you haven't installed Gtk3 gir files. – Havok Aug 07 '12 at 03:24
  • I'm quite sure that both GTK2 and GTK3 library are installed on my system…but are there any config files setting the default lib used for python bindings? I'm working on Ubuntu Linux 12.04… – Chaser hkj Aug 08 '12 at 16:40

1 Answers1

4

Check you have installed the development packages for GTK+ 3. In your case, with Ubuntu 12.04, you should have installed libgtk-3-dev.

gpoo
  • 8,408
  • 3
  • 38
  • 53