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?


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.

  • Right. I used the later using 'python2.7 setup.py 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.