Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install a deb package I built from source, the package is call LIO-Utils.

LIO-Utils and the packages to follow require Python2.6 but Ubuntu 11.10 Server is running Python2.7.

I have already installed Python2.6 via apt-get, and when I go to install the package LIO-Utils installs to the Python2.7 directory and not the Python2.6.

Is there a way to force installation into a specific version? I cannot remove Python2.7 because alot of Ubuntu's tools are based on Python2.7

share|improve this question
up vote 1 down vote accepted

As a rule a Linux system will depend, system-wide, on the Python version it was built with. In the case of Ubuntu 11.10 this is Python 2.7 - as you say.

dpkg (and friends) will default to installing for the default Python version set as follows:

  1. symbolic link listed in the /etc/alternatives directory
  2. the version that symbolic link /usr/bin/python is pointing at

like so:

$ ls -al /etc/alternatives | grep python
$ ls -al /usr/bin/python

You can temporarily change the default version of Python that your system utilities use by pointing the link to Python 2.6

$ sudo update-alternatives --config python

if Python 2.7 (or 2.6) does not display as choice then you have to first install it in the alternatives system. This is a guide.

Install the .deb package you built and then change the alternatives symbolic link back to the system's expected version:

$ sudo update-alternatives --config python

The subsystem that prescribes the Python version a Debian-based distro uses is discussed here

share|improve this answer
I ended up using update-alternatives does this accomplish the same thing? – ianc1215 Dec 27 '11 at 7:20
you're absolutely correct - that primary option slipped my mind at the time i answered. I will update my answer for the sake of other users – venzen Dec 27 '11 at 8:02
awesome thanks for the help. – ianc1215 Dec 27 '11 at 21:58

Your Answer


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.