I have uninstalled python3 using brew on macOS Catalina 10.15.3:
brew uninstall python3 brew list | grep python python@2 But it still there:
which python3 /usr/bin/python3 python3 -V Python 3.7.3 /usr/bin/python3 -V Python 3.7.3 ls -ltah /usr/bin/ | grep python -rwxr-xr-x 1 root wheel 31K Jan 23 16:58 python3 lrwxr-xr-x 1 root wheel 75B Dec 16 06:20 python2.7 -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 82B Dec 16 06:20 python-config -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 76B Dec 16 06:20 pythonw2.7 -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 82B Dec 16 06:20 python2.7-config -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 76B Dec 16 06:20 pythonw -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 75B Dec 16 06:20 python2 -> ../../System/Library/Frameworks/ lrwxr-xr-x 1 root wheel 75B Dec 16 06:20 python -> ../../System/Library/Frameworks/ It's interesting but on error it shows different location of python:
python3 -bla Unknown option: -l usage: /Applications/ [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. Seems it's related to Xcode.
How to delete this version python3 and reinstall python using brew?
Update:
sudo rm -f /usr/bin/python3 rm: /usr/bin/python3: Operation not permitted 11 Answer
Catalina comes with python3 installed by default**. You can't delete it, because /usr/bin is on the System's read-only volume.
If you install your new python to a bin folder that comes before /usr/bin in your $PATH, then it should take precedence.
** (Well OK, the first time you run it, you have to install Xcode command line tools to make it work. But that file itself is a system install.)
4