MacPorts says I still have Python 2.7 when "python --version" is run

Viewed 359

After instructing MacPorts to switch to Python 3.4, python --version still outputs 2.7.10. Note that "which python" does show that /opt/local/bin is coming before /usr/bin/ in my PATH:

$ which python
/opt/local/bin/python
$ python --version
Python 2.7.10
$ ls -l /opt/local/bin/python
lrwxr-xr-x  1 root  wheel  24 Aug  1 10:00 /opt/local/bin/python -> /opt/local/bin/python2.7
$ sudo port select --list python
Available versions for python:
    none
    python26-apple
    python27 (active)
    python27-apple
    python34
$ sudo port select --set python python34
Selecting 'python34' for 'python' succeeded. 'python34' is now active.
$ which python
/opt/local/bin/python
$ python --version
Python 2.7.10
$ ls -l /opt/local/bin/python
lrwxr-xr-x  1 root  wheel  24 Aug  1 10:00 /opt/local/bin/python -> /opt/local/bin/python3.4

Note how the symlink does change, but the stated version doesn't change. What gives?

1 Answers
Related