Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

migrated from unix.stackexchange.com Jun 8 '11 at 16:04

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

add comment

2 Answers 2

up vote 4 down vote accepted

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 on Ubuntu 10.04

share|improve this answer
add comment

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.

share|improve this answer
    
+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 '11 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 '11 at 9:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.