sto usando Debian 6.04 e Python 2.7
ho compilato Python 2.7, (./ configure, make, make install)
nella console:Come installare gtk in python2.7?
>python2.7
Python 2.7.3 (default, Jul 28 2012, 16:54:06)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gtk
Come si installa gtk in Python 2.7?
In Python 2.6:
[email protected]:~$ python
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> import pygtk
>>> import gobject
Si prega di non fare un 'sudo pip install' sul sistema (come alcune delle risposte consigliano). Ignora il sistema di gestione dei pacchetti principale e questo può diventare un mal di testa durante l'aggiornamento. Utilizzare un virtualenv o utilizzare la versione di pygtk disponibile nel repository debian standard e apt-get it. Perché stai compilando Python? 2.7 non è pacchettizzato in Debian? –