7

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?

3 Answers 3

7

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

1
  • tnx allot! it was simply a matter of use the correct apt-get commands!
    – Gabriele B
    Sep 2, 2011 at 10:16
3

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

1
0

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

You must log in to answer this question.

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