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 command,

python --version

To know the list of python versions available on your macOS, run the below command in 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


  • I am using macOS Big Sur and its 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!

Hello there!,

You are using AdBlocker!

I am an independent developer trying to help fellow developers and students to resolve issues faced on a day-to-day basis, we 'Code to Care' . There is a lot of expenses involved in hosting and managing a website that's the reason we have ads.

A humble request to you to disable adBlocker on and support us pay our bills.

Cod2care - Line's of code for change.

To see contents reload page after unblocking
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities. Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, Tips-n-tricks, How Tos, Blogs, Articles, etc. on various platforms like Windows, Mac, Linux, Mobile platforms, etc. Technologies/Languages like Java, Objective-C, PHP, .Net, Android, SharePoint, jQuery, HTML, CSS, etc.