DEV Community

loading...

Discussion on: How to set Python3 as a default python version on MacOS?

Collapse
fxgx99 profile image
C Martin • Edited

Hi I am having a similar problem but i just recently updated to MacOs Big sure and I have been trying to install aws cli and ran into this python version issue. Below is the output of ls -l /usr/local/bin/python*: however i am still getting Python 3.7.10 as my default and I will like to change that to python3.9

The first 10 lines of ls -l /usr/local/bin/python* is below :
rwxr-xr-x root admin 24 B Wed Apr 7 09:42:43 2021  python ⇒ /usr/local/bin/python3.9

rwxr-xr-x christian wheel 71 B Sun Nov 8 08:08:51 2015  python-32 ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-32

rwxr-xr-x christian wheel 75 B Sun Nov 8 08:08:51 2015  python-config ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-config

rwxr-xr-x christian wheel 69 B Sun Nov 8 08:08:51 2015  python2 ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2

rwxr-xr-x christian wheel 72 B Sun Nov 8 08:08:51 2015  python2-32 ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2-32

rwxr-xr-x christian wheel 76 B Sun Nov 8 08:08:51 2015  python2-config ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config

rwxr-xr-x christian wheel 71 B Sun Nov 8 08:08:51 2015  python2.7 ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

rwxr-xr-x christian wheel 74 B Sun Nov 8 08:08:51 2015  python2.7-32 ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32

rwxr-xr-x christian wheel 78 B Sun Nov 8 08:08:51 2015  python2.7-config ⇒ ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config

rwxr-xr-x root wheel 69 B Wed Apr 7 07:59:49 2021  python3 ⇒ ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3

Collapse
malwarebo profile image
Irfan Author

Did you try this:

ln -s -f /usr/local/bin/python3.9 /usr/local/bin/python

Provided you have installed Python 3.9.