Hello. First post, so I apologize if I'm doing everything wrong. Maybe this is too general for a distro specific section, or maybe it's just a dumb question.
Anyway, I'm trying to get Python (3) working with GTK (3). Was following along with a
tutorial, so I get to the basic hello world or whatever. Run it, get this error:
Code:
ERROR:root:Could not find any typelib for Gtk
Traceback (most recent call last):
File "./hello2.py", line 2, in <module>
from gi.repository import Gtk
ImportError: cannot import name Gtk
I shortened the program to just this, still get the error above:
Code:
#!/usr/bin/python
from gi.repository import Gtk
I'm on Anti-X 13.1. Have installed python (3 and 2, latest versions I think), gobject-instrospection, and python-gi. And some other things I thought sounded possibly related. If anything in particular needs to be (not) installed, call 'em out so I can check.
I found
this which seems to point in the right direction, but lacks detail:
Quote:
Originally Posted by Michael Dussere
The problem is due to the compiled version of GTK3 that was not referenced in gobject-introspection.
It is simple to check the problem by listing the .typelib files in gobject-introspection
$ which g-ir-scanner
/Produits/publics/x86_64.Linux.RH6/gobject-introspection/1.40.0/bin/g-ir-scanner
$ ls /Produits/publics/x86_64.Linux.RH6/gobject-introspection/1.40.0/lib/girepository-1.0/
cairo-1.0.typelib fontconfig-2.0.typelib GIRepository-2.0.typelib GModule-2.0.typelib win32-1.0.typelib xlib-2.0.typelib
DBus-1.0.typelib freetype2-2.0.typelib GL-1.0.typelib GObject-2.0.typelib xfixes-4.0.typelib xrandr-1.3.typelib
DBusGLib-1.0.typelib Gio-2.0.typelib GLib-2.0.typelib libxml2-2.0.typelib xft-2.0.typelib
The problem should be solved by recompiling GTK (and its dependencies) with the configure option --enable-introspection=yes.
|
A. What does he mean by 'easy to check'? What am I checking for in that folder?
B. Any good guides I can use for recompiling stuff (GTK)?