Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Ubuntu, how to install pygtk for python 2.7 through apt-get?

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?

like image 325
kostmo Avatar asked Nov 06 '22 00:11

kostmo


1 Answers

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).

like image 64
tshepang Avatar answered Nov 07 '22 13:11

tshepang