How to update Python

I'm going to show you how you can update your Python version. In my case, I had a fairly old one.

To find out what version you have installed, you can use python3 --version or simply python --version, depending on your operating system. Sometimes it responds with one, sometimes with the other—who knows why.

$ python -V

In my case, it returns this version: Python 3.9.6, and after some Googling I discovered that it was released in 2021. We are in 2025, so it is clearly outdated.

Why upgrade?

While trying to install Django, I encountered an error: I couldn't meet the minimum version requirement. The system forced me to use older versions of Django (like 4, 3, or 2), which didn't work for me. That's why I absolutely had to update.

How to update Python?

1. Download from the official website
First, go to the official website:
https://www.python.org

There you can download the latest version for your operating system.

2. Alternatives depending on the system
On Mac: You can use the installer directly or tools like Homebrew.

On Linux: You can update Python using the appropriate package manager (apt, dnf, etc.).

On Windows: Download the installer from python.org. During the installation, be sure to select the "Add Python to PATH" option. This allows you to use Python from the terminal (CMD or PowerShell) without complications.

Step-by-step installation

Once the installer has downloaded:

  1. Accept the licenses.
  2. Enter your password if you're on a Mac.
  3. Wait... (it may take a while, so be patient).
  4. In my case, version 3.13.5 was installed, which is the latest version available as of today.

Verifying the installation

Once installed, open a new terminal (this is important). Type:

$ python3 --version

And you should see something like this:

Python 3.13.5

Done! You now have the updated version. In my case, it automatically overwrote the previous version.

Conclusion

These steps should work on Mac, Windows, and Linux (with minor variations). And as you can see, you no longer need to ask Google what version you have or if it's compatible with a particular library. You're now up to date!

I agree to receive announcements of interest about this Blog.

We talked about how we can update Python.

- Andrés Cruz

En español