This question already has an answer here:
- Why not use “which”? What to use then? 4 answers
I'm on OSX and if I run
python --version in a bash shell, I get this:
$ python --version Python 3.7.3
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?