In my earlier article, we have seen how to check if python is already installed in macOS computer. Now, we will see how to upgrade it to the latest version i.e. 3.x.
Steps To Upgrade Python to 3.x
- Download latest version of Python from https://www.python.org/downloads/mac-osx/. As of now (Sep 9, 2020) the latest version of Python is 3.8.5.
- Scroll to the bottom of the page Python 3.8.5 and download the pkg file for macOS 64-bit installer. The downloaded file will be python-3.8.5-macosx10.9.pkg. This installer is for macOS 10.9 (OS X Mavericks) or later.
- Double click the downloaded pkg file to launch the Python Installer window.
- Press Continue in this screen and further to proceed with the installation.
- Finally press Install button in the Installation Type screen.
- Once the installation is complete, you will be navigated to the summary screen with the message of successful installation.
- Press Close to close the installation window and to remove the files used for instillation.
- Now to verify the installed version, launch Terminal and type in python3. You will see the newly installed version of Python. (NOTE: If you type in just python, you will see the old version of Python i.e 2.x. This is because Python 3.x is installed side by side with Python 2.x.)
Now latest version of Python is ready on your macOS system.
- Setting-up Python on Visual Studio Code editor on macOS.
- Upgrading Package Installer for Python (PIP) to it’s latest version on macOS.
- Download latest python from here.