Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a debian 6.0.2.1 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
add comment

1 Answer

up vote 0 down vote accepted

Each Python program starts with a line

  #!/usr/bin/python

You can change that line to

  #!/usr/bin/python2.7

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 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
add comment

Your Answer

 
discard

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.