i try to install pygobject for python 3 in fedora 18 i read this doc https://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html and i try to install jhbuild after that when i type $ jhbuild sanitycheck get this error : bash: jhbuild: command not found...
i try to install with yum , i install "pygobject3-devel" but this not work with python3 in fedora 18 default python is python2.7.3, i install python3.3.0 with yum and test a first demo code :
#!/usr/bin/python
from gi.repository import Gtk
win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
after give chmod +x for this python file can run with this command "./test.py" and if i try to run with python (with out use #! ....) and type this command "$python test.py" that run and work without any problem but when i type this command "$python3 test.py" i get this error :
Traceback (most recent call last):
File "test.py", line 2, in <module>
from gi.repository import Gtk
ImportError: No module named 'gi'
have any idea ? thanks
Try installing pygobject3
instead of pygobject3-dev
(as a matter of fact, it seems that pygobject3 is already installed in a vainilla installation of Fedora).
After installing that package, you should be able to open your interpreter (python2.7) and do:
from gi.repository import Gtk
If you want to use python3 (I didn't understand if you meant that you tried to use python3 or you want to use python3), it seems that the gnome instrospection bindings are not yet available, according to this page that summarizes the state of different packages python3-related that are being on the works.
EDIT: I just tried installing python3-gobject
(which should be installed when installing pygobject3
, but it doesn't for some reason) and it seems to be working aswell on python3.