Ubuntu – How to install a different version of python-dev

aptdevelopmentpython

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?

Best Answer

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