Python is one of the most popular scripting languages used on any platform, including Mac. It’s used for everything from coding websites to scraping data for analysis and building complex infographics and artificial intelligence tools like Stable Diffusions. Apple used to include a version of Python with macOS, and you could access it in the Terminal app. However, it stopped doing that when it launched macOS Catalina. If your Mac is running Catalina or an older version of macOS, you’ll have an old version of Python. In this article, we’ll show you how to upgrade Python on your Mac. And the good news is that if you have a newer version of macOS that doesn’t have Python installed, you can use the same method to install it for the first time.

Why upgrade the Python version on your Mac?

The main reason for upgrading Python is that each new version adds new features, improved compatibility, and better security. So, even if you don’t use Python regularly, it’s a good idea to upgrade to the latest version.

How to check which version of Python is on your Mac

If you’re not sure which version of Python, if any, is on your Mac, there’s an easy way to check it.

Go to your Applications folder > Utilities and open Terminal. Then, follow the steps below:

  1. Type: python --version
  2. Press Return.
  3. If Python is installed, you will see a message telling you which version.
  4. If it’s not installed, you will see command not found: python

How to upgrade the Python version on your Mac

The easiest way to upgrade the Python version on your Mac is to download the latest version from python.org and use the installer.

  1. In a web browser, navigate to the Python website.
  2. Underneath ‘Download the latest version for macOS,’ click Download Python.
  3. When the installer has downloaded, double-click it.
  4. Click Continue.
  5. Follow the instructions on the screen to install Python.
  6. When the installation has finished, go to the Python folder in your Applications folder.
  7. Double-click IDLE to open it (you will need to agree to allow it to access your Documents folder).
  8. At the top of the screen, you will see the version of Python that was installed.
Tip: How to upgrade apps easily

Did you know there is a way to update all the apps on your Mac at the same time, with only a few clicks? It’s much easier than updating apps individually from the App Store and developers’ websites. It uses the Applications feature in CleanMyMac. It scans your Mac looking for updates and also checks for leftovers from the apps you’ve uninstalled before. Here’s how to use it:

1. Open CleanMyMac (free download here).

2. Choose Applications in the sidebar and run a quick scan.

3. Click Update.

applications updater detailed results


How to upgrade Python using Terminal

The easiest way to upgrade Python using Terminal is to use Homebrew. Homebrew is a package installer and can be used to install lots of different packages in Terminal.

If you’ve already installed Homebrew, you can skip the steps below. If not, follow them to install it:

  1. Go to Applications > Utilities and launch Terminal.
  2. Paste this command in Terminal: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Press Return.
  4. Type in your admin password and press Return.
  5. Press Return when requested in the Terminal window.
  6. Wait for Homebrew to install.

Once Homebrew is installed, you can upgrade Python.

  1. Paste this command in Terminal: brew install python
  2. Press Return.
  3. Wait for Python to install.
  4. Once it has installed, you can use the new version of Python with this command: python 3

How to use Python on Mac

You can execute Python commands in Terminal once you’ve installed it. However, if you want to do more than execute the odd line of code, you’re much better off using a specialist application called an integrated development environment or IDE. Until recently, one of the best options for using an IDE on Mac was Microsoft’s Visual Studio. However, Microsoft announced that it will no longer develop Visual Studio for Mac, so the best option is now Apple’s own Xcode IDE. If you don’t want to install Python on your Mac, you can still write, test, and execute code in a web browser using Google’s Colab notebooks.

Python is a widely used scripting language and very useful for a number of tasks. It’s also a great language to learn as an introduction to coding. If you have Python installed on your Mac and think that it may not be the latest version, you should upgrade it to make sure you have access to the newest features and improvements. Follow the steps above to check which version, if any, is installed on your Mac and upgrade Python.