On Ubuntu 10.04 I recently installed Python 2.7.1 (ActivePython from ActiveState). I use meld to diff code and had no issues with Python 2.6.5, but after moving to 2.7.1 I get the following error when I execute meld:

Meld requires pygtk 2.8.0 or higher

Looking in Synaptic Package Manager, I have python-gtk2 installed which I believe maps to pygtk, but since meld cannot find it, does that mean it is installed for 2.6.5?

If I run the following:

pip install pygtk

I get:

ImportError: No module named dsextras

dsextras seems to be part of PyGObject but if I try to do:

pip install pygobject

I get an error that indicates that this type of installation is only supported on Windows:

Not supported, ok [y/N]? Error: distutils build only supported on windows

What's the recommended way of migrating to a newer Python version? Is it possible to import the packages from 2.6.5 into 2.7.1 or do I risk running into compatibility issues?

2 Answers 2


This is a better way of installing Python 2.7 into Ubuntu 10.04. What's the best way to get Python 2.5 and 2.7


You'll run into compatibility issues with packages with binary modules, including pygtk.

As far as I understand, the ActiveState distribution is okay on windows where there's no native python, but external binary packages look less attractive on ubuntu. Your other options are upgrading to ubuntu 10.10, which I'd recommend, compiling your own python for your home, staying python2.6 compatible, or backporting the python2.7 package from 10.10.

  • +1: and to amplify since many core functions of the Ubuntu distribution are written in Python and are strongly version dependent. Stepping outside the Ubuntu/Debian package dependency tools (apt and friends) guarantees that you will break system critical mechanisms. Forget that ActiveState exists if you are using Ubuntu.
    – msw
    Jun 9, 2011 at 3:16
  • +1 for pointing out the dangers of upgrading and for providing options. broush's answer however led me to askubuntu.com/questions/17841/…, so I now have python2.7 in a virtual environment.
    – Fredrik H
    Jun 10, 2011 at 9:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .