How to get rid of Python2.7 pre-installed by Apple
Mac comes with Python2.7 installed by Apple.
I needed to use a more recent version so I installed Python3.8.
I followed an article, I found online on www.macupdate.com/app/mac/5880/python/uninstall
to get rid of Python2.7 before installing Python3.8.
I think I botch something in trying to eliminate Python2.7 from my Mac.
I opened a terminal and launched python. Unluckily The old pre-installed version is still there.
mauramonville@Mauras-MacBook-Pro ~ % python --version
Python 2.7.16
mauramonville@Mauras-MacBook-Pro /usr % ls
X11 bin libexec sbin standalone
X11R6 lib local share
I looked for files whose name contains the string "python" and found traces of both Python versions.
mauramonville@Mauras-MacBook-Pro /usr % pwd
/usr
mauramonville@Mauras-MacBook-Pro /usr % find . -name "python*" -print
./bin/python3
./bin/python
./bin/python2
./bin/pythonw
./bin/python2.7-config
./bin/pythonw2.7
./bin/python-config
./bin/python2.7
find: ./sbin/authserver: Permission denied
./local/bin/python3
./local/bin/python
./local/bin/python3.8
./local/bin/python3-config
./local/bin/python3.8-config
./lib/python2.7
./share/man/man1/python2.7.1
./share/man/man1/pythonw2.7.1
./share/man/man1/python.1
./share/man/man1/pythonw.1
./share/vim/vim82/indent/python.vim
./share/vim/vim82/ftplugin/python.vim
./share/vim/vim82/autoload/python3complete.vim
./share/vim/vim82/autoload/pythoncomplete.vim
./share/vim/vim82/syntax/python.vim
./share/file/magic/python
I notice a mixture of python2.7 (pre-installed by Apple) and python3.8 (installed by myself).
mauramonville@Mauras-MacBook-Pro local % pwd
/usr/local
mauramonville@Mauras-MacBook-Pro local % find . -name "python*" -print
./bin/python3
./bin/python
./bin/python3.8
./bin/python3-config
./bin/python3.8-config
How can I get rid of python2.7 and use python3.8 instead?
Thank you so much in advance.
Best regards,
mauede33
MacBook Pro 16″, macOS 11.5