I'm on OSX and if I run python --version
in a bash shell, I get this:
$ python --version
Python 3.7.3
But the which python
command appears to be pointing to version 2.7.
$ which python
/usr/local/bin/python ls -al /usr/local/bin/python
lrwxr-xr-x 1 me admin 36 11 Apr 22:28 /usr/local/bin/python -> ../Cellar/python@2/2.7.16/bin/python
I think this is because I have done alias python=python3
: but why does which python
not pick up the alias?
type
command may be of interest to you... – ivanivan Apr 18 '19 at 13:12