On 2018-10-29 21:05, Murray Eisenberg wrote: > After > > sudo port select --set python python37 > Selecting 'python37' for 'python' succeeded. 'python37' is now active. > I have: > > port select --list python > Available versions for python: > none > python27 > python27-apple > python37 (active) > > Nonetheless: > > which python > /opt/local/bin/python > python --version > Python 2.7.3 > > And how do I get the version invoked by “python” at command line to be 3.7?
Your shell cached "python" to mean "/usr/bin/python". It is not evaluating the full PATH on every command invocation as it would be quite slow to walk the filesystem every time. This cache will not be updated unless you tell your shell to do so. Either run 'hash -r' or close and reopen your terminal window. Rainer
