Set Python 3.8 as a default python version on macOS

You would get Python version 2.7 or below being installed by default with macOS, you can check your default Python version by following the command,

python --version

To know the list of Python versions available on your macOS, run the below command in a terminal,

ls -ltr /usr/local/bin/python*

If you want to set Python 3.8 as the default Python version on macOS,

  1. Install latest version of python using terminal command: $ brew install python
  2. Now change the default python symlink to the version you just installed.
    ln -s -f /usr/local/bin/python3.8 /usr/local/bin/python
  3. Now check the default version again using python --version command

⚡️ This should work on Big Sur, Mojave, High Sierra e.t.c


Comments:

  • I am using macOS Big Sur and it's working for me!
    anonymous 03 Sep 2020 05:10:54 GMT
  • Hey man! this was useful information.
    bigMac 02 Sep 2020 11:12:25 GMT
  • Further comments disabled!

This is not an AI-generated article but is demonstrated by a human.

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!