Setup python3 as the default version on Mac

Verma Varun
Nov 10, 2021

After installing XCode on Mac, the system now has both python and python3 available. By default, python still points to the python 2.7 binary. In order to make python3 to be your default version, add the following PATH to your ~/.zshrc file

export PATH="/usr/local/opt/python/libexec/bin:${PATH}"

Restart the terminal and check out the python version, and you’ll notice that python now is pointing to the latest version.

varun.verma~ # python --versionPython 3.9.7

--

--

Verma Varun

Mastering automation, improving efficiency and connecting systems.