Newbie: where's the new python gone?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Sep 9 10:50:23 EDT 2012
On Sun, 09 Sep 2012 07:28:55 -0700, BobAalsma wrote:
> I think I've installed Python 2.7.3 according to the instructions in the
> README, and now want to use that version. However, when typing "python"
> in Terminal, I get "Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) ".
Did you run "make altinstall"? You should, because it is a bad idea to
replace the system Python with a newer (or worse, older) version. You can
break things.
> So:
> (1) I can't seem to find where the new software has gone
Just enter "python2.7" instead of "python" and it should work perfectly.
> and (2) can't
> seem to find how to point to this new versoin. I've searched Python.org
You won't find it there *wink*
At the terminal, enter:
which python2.7
which should return the full path to the executable, e.g.:
[steve at ando ~]$ which python2.7
/usr/local/bin/python2.7
My system uses Python 2.4 as the system Python, but I prefer to use
Python 2.7 as my default. So I have this command in my .bashrc file:
alias python='python2.7'
which means that *for me*, "python" launches Python 2.7, but when system
tools call "python" they still see the version they are expecting.
If your shell is something other than bash, you may need to use a
different rc file.
Did any of this make sense to you? If anything was unclear, please don't
hesitate to ask.
--
Steven
More information about the Python-list
mailing list