First, notice that 10.8 comes with 2.5, 2.6, and 2.7, all available as /usr/bin/python2.*
.
Next, how did you install Bazaar?
I'm guessing you installed a binary package, and it was specifically packaged to rely on /usr/bin/python2.6
because that version is there in all OS X 10.5+ versions, or because that's what they tested on, or… whatever.
(It's also possible you installed it via, say, easy_install-2.6
, or some indirect equivalent of the same thing. But that seems like a silly thing to do.)
If you want Bazaar to use packages you've installed via Homebrew, you're probably going to want to use either Homebrew itself, or the pip
from Homebrew's Python, to install Bazaar.
From a comment, you said you vaguely remember running the installer from Canonical. As their Mac OS X Downloads and Installation page makes clear, what you downloaded is for "Snow Leopard (10.6 - Python 2.6)". (Also, you downloaded the "Test" version instead of the stable, given that you have 2.6b1.) It even says:
At some point the installer will be able to use 2.7 but for now this is the easiest way to get Bazaar working with Lion.
So, this is all documented pretty clearly. Their installer uses Apple's system Python, and specifically uses 2.6 for OS X 10.6+.
Since Bazaar is pure Python code, the way it's finding 2.6 is simple: The first line of /usr/local/bin/bzr
is something like this:
#!/usr/bin/python2.6
or:
#!/usr/bin/env python2.6
You could hack that up to, say, #!/usr/local/bin/python2.7
. But that's a very bad idea. You've got something that installed and configured itself against one Python, you don't want to try to run it against another. (Since it's pure Python code, it will mostly work, but sometimes fail in mysterious ways, which is probably worse than code that uses C extensions or embedding which will probably just fail immediately.)