¿Cómo hacer que tkinter funcione con la instalación por defecto de Ubuntu Python 2.7?
Estoy usando Ubuntu 11.10, que venía preinstalado con Python 2.7.3.
Instalé el paquete python3 y el paquete python3-tk, a través de apt-get install, y trabajaron juntos "fuera de la caja".
Pero a pesar de que instalé el paquete python-tk, no puedo averiguar cómo obtener Python2.7 para verlo. Recibo el siguiente mensaje de error cuando intento importarlo.
import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
Edición: también corrí lo siguiente basado enPaquete Python-tk no reconocido en Python 2.7.3, y consiguió:
$ file /usr/lib/libtk8.5.so.0
/usr/lib/libtk8.5.so.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
$ uname -a
Linux bugbot 3.0.0-23-generic-pae #39-Ubuntu SMP Thu Jul 19 19:39:19 UTC 2012 i686 i686 i386 GNU/Linux