On Ubuntu, how to install pygtk for python 2.7 through apt-get?
The version that will work for you is in 11.04 (depends on python2.7
). The one in 10.10 won't work since it depends on python2.6
(and built against it).
kostmo
Updated on June 11, 2022Comments
-
kostmo almost 2 years
I'm using Ubuntu 10.10, which comes with Python 2.6. I would like to test a PyGTK app I'm writing with Python 2.7.
After installing the
python2.7
package, if I try to run my app like this:python2.7 <my_app>
, I get the error:ImportError: No module named pygtk
My first idea was to try uninstalling the
python-gtk2
package, then reinstalling it, in hopes that it would be installed for both Python versions this time around.However, uninstalling that package would remove dozens of critical applications that depend on PyGTK, including
gnome-panel
.Is there an
apt-get
command that will install PyGTK2 for Python 2.7 without first uninstalling?