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.

The default python version on my ubuntu system is 2.7, but 2.6 is still present.

I've installed headers (apt-get install python-dev), since it's needed to compile and install python packages, for current version.

However, some of my projects still run on a 2.6 virtual python environment. For them, I cannot install eggs and packages since, among others, Python.h is missing. Do I need to install an older version of python-dev? How to do so?

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Try installing python2.6 and python2.6-dev.

share|improve this answer
    
tnx allot! it was simply a matter of use the correct apt-get commands! –  Gabriele B Sep 2 '11 at 10:16
add comment

You can use python virtualenv in order to separate the different versions and packages of python you need to run.

This question also deals with a similar problem.

There is also a bash script for installing and switching versions of python on the fly. If I remember the name of it I will edit this post. You can use that as well as Virtualenv to completely change python environments

share|improve this answer
    
add comment

My instinctual response would be you'd need to install python from source, typically this installs to different target locations on the drive so you should be fine. I found a link a that might help you compile from source.

http://diveintopython.org/installing_python/source.html

share|improve this answer
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.