Server Fault is a question and answer site for system and network administrators. 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 have a debian machine with default python 2.6. I compiled and installed python 2.7 on it and validated that 'python' executes 2.7 and not the older 2.6.6. Now, I am trying to install bzr (sudo apt-get install bzr) on this machine but it installs against python 2.6 and not python 2.7. I recognize this using the command 'bzr --version'.

Any idea how I can insall bzr against the newer python 2.7 which already exists in my path?

share|improve this question
up vote 0 down vote accepted

Each Python program starts with a line


You can change that line to


Alternativetly just execute the command using a Python interpreter

  python2.7 /usr/bin/bzr

However it is highly likely that bzr depends on stuff Debian should install to /usr/lib/python2.6 or /usr/lib/python2.7 and what you think you are doing is wrong and not going to work - someone should repack bzr to Debian to make it work with newer Python.

share|improve this answer
Right. I used the later using 'python2.7 install'. What I was expecting was that the bzr installation will take the python bin from the path, but that's not the case. Found that 'apt' on Debian is trying to install bzr using the 'default' version python that comes along with Debian, which is 2.6.6. Not sure what that should be the case. – Ethan Collins Aug 9 '11 at 9:58
Debian only supports for one Python version for all its distro packages. If you want to do use another Python then you pretty much need custom packages (Ubuntu provides plenty of them) or hand-build – Mikko Ohtamaa Aug 9 '11 at 15:09

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.