zsh; Terminal has Full Disk Access permission in System Preferences.
/usr/bin % ls -alF python
lrwxr-xr-x 1 root wheel 75 Jul 12 11:48 python@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/usr/bin % sudo unlink python
Password:
unlink: python: Operation not permitted
/usr/bin %
EDIT by OP to add this terminal transcript:
~ % whence python
/usr/bin/python
~ % echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/brec/.rvm/bin
~ % ls -alF /usr/local/bin/python
lrwxr-xr-x 1 brec admin 24 Dec 11 10:45 /usr/local/bin/python@ -> /usr/local/bin/python3.8
~ % python
WARNING: Python 2.7 is not recommended.
NOTE: /usr/local/bin/python3.8 does not exist.
sudo chown
the symlink. – ChlamydeousPATH
variable ahead of/usr/bin
, or use virtual environments. – Turoffwhence python
returns /usr/bin/python which is a symlink to a python2.7.alias
returns no alias forpython
. Why does the python command resolve to /usr/bin/python ? – Stabilitywhence python
return/usr/bin/python
, then eitherPATH
isn't what you think it is, your shell's path cache needs to be refreshed, orpython
isn't installed in/usr/local/bin
. – Turoff