0

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?

1 Answers1

0

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.

Mikko Ohtamaa
  • 1,364
  • 3
  • 17
  • 28
  • 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 09 '11 at 09: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 09 '11 at 15:09