Re: [gtk-osx-users] ImportError: No module named gi.





On Mar 30, 2019, at 1:31 PM, Pascal <abo pignard wanadoo fr> wrote:


Le 30 mars 2019 à 20:24, Timo via gtk-osx-users-list <gtk-osx-users-list gnome org> a écrit :

Op 30/03/19 om 18:55 schreef Pascal:
Hello John,

Sorry, my wording was incorrect.
$ jhbuild build pygobject
is built without any error.
But I've got "ImportError ... gi" when running my app.
Did you enter the jhbuild shell before running your app? Something like this:

$ jhbuild shell
$ ./my_app.py

Or try with the interpreter first:  (still within jhbuild shell)
$ python
from gi.repository import Gtk

Hello Timo, I get:

$ jhbuild shell
Prefix: /usr/local/xnadalib-2018
Entered jhbuild shell, type 'exit' to return.

[JH] $ which python
/usr/local/xnadalib-2018/bin/python

[JH] $ python
Python 2.7.14 (default, Sep 13 2018, 10:35:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from gi.repository import Gtk
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named gi.repository

You said that pygobject built and installed correctly. Where did it install gi?

Regards,
John Ralls



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]