python import error after install new gobject-introspection

Asked by sk.liu on 2013-02-05

Hi All,
after I install new gobject-introspection-1.34.2

I try following code in python

from gi.repository import Gtk

ERROR:root:Could not find any typelib for Gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Gtk

is there anything I missing when I install "gobject-introspection" ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu totem Edit question
Assignee:
No assignee Edit question
Solved by:
sk.liu
Solved:
2013-02-20
Last query:
2013-02-20
Last reply:
sk.liu (kevin631012) said : #1

hi all ,
I try to reinstall gobject-introspection many times . python sys.path doesn't try to import the place where I installed "/usr/local/lib" .
so I add "export PYTHONPATH=/usr/local/lib/python2.7/site-packages/"
python can import "right" libraries then error messages gone .