How to Update Python: A Comprehensive Guide
Daniel Hayes
Full-Stack Engineer · Leapcell

Key Takeaways
- Regularly updating Python ensures better performance and security.
- Python can be updated differently on Windows, macOS, and Linux.
- Homebrew (macOS) and APT (Linux) simplify version management.
Python is a versatile and widely-used programming language. Regularly updating Python ensures access to the latest features, security patches, and performance improvements. This guide provides step-by-step instructions to update Python on Windows, macOS, and Linux systems.
Checking Your Current Python Version
Before updating, it's essential to know your current Python version:
-
Open the command line interface:
- Windows: Open Command Prompt.
- macOS/Linux: Open Terminal.
-
Check the Python version:
- Type
python --version
orpython3 --version
and press Enter. - The installed Python version will be displayed.
- Type
Updating Python on Windows
There are two primary methods to update Python on Windows: using the official installer or via the Microsoft Store.
Method 1: Using the Official Installer
-
Download the latest installer:
- Visit the official Python website.
- Download the latest stable version suitable for your system (e.g., Windows installer 64-bit).
-
Run the installer:
- Locate the downloaded file and double-click to run it.
- In the installer, check the box labeled "Add Python to PATH."
- Click "Install Now" and follow the on-screen instructions.
-
Verify the installation:
- Open Command Prompt.
- Type
python --version
and press Enter. - Confirm that the displayed version matches the one you installed.
Method 2: Using the Microsoft Store
-
Open the Microsoft Store:
- Click on the Start menu and open the Microsoft Store.
-
Search for Python:
- In the search bar, type "Python" and press Enter.
- Select the latest version provided by the Python Software Foundation.
-
Install Python:
- Click "Get" to download and install Python.
-
Verify the installation:
- Open Command Prompt.
- Type
python --version
and press Enter. - Ensure the displayed version matches the one you installed.
Note: The Microsoft Store version handles PATH settings automatically and provides automatic updates.
Updating Python on macOS
On macOS, you can update Python using the official installer or Homebrew.
Method 1: Using the Official Installer
-
Download the latest installer:
- Visit the official Python website.
- Download the latest macOS 64-bit universal2 installer.
-
Run the installer:
- Locate the downloaded
.pkg
file and double-click to open it. - Follow the on-screen instructions to complete the installation.
- Locate the downloaded
-
Verify the installation:
- Open Terminal.
- Type
python3 --version
and press Enter. - Confirm that the displayed version matches the one you installed.
Note: macOS comes with a pre-installed version of Python used by the system. It's advisable not to modify or remove the system's default Python version, as it may affect system functionalities.
Method 2: Using Homebrew
-
Install Homebrew (if not already installed):
- Open Terminal.
- Type the following command and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Update Homebrew:
- In Terminal, type:
brew update
- Press Enter.
- In Terminal, type:
-
Upgrade Python:
- Type the following command and press Enter:
brew upgrade python
- Type the following command and press Enter:
-
Verify the installation:
- Type:
python3 --version
- Press Enter and ensure the displayed version is the latest.
- Type:
Note: Homebrew simplifies the management of software packages on macOS and is a preferred method for many developers.
Updating Python on Linux
Linux distributions often come with Python pre-installed. Updating Python can vary based on the distribution.
Using APT on Ubuntu/Debian
-
Add the deadsnakes PPA:
- Open Terminal.
- Type the following commands and press Enter after each:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update
-
Install the latest Python version:
- Type:
sudo apt install python3.13
- Press Enter.
- Type:
-
Verify the installation:
- Type:
python3.13 --version
- Press Enter and ensure the displayed
- Type:
FAQs
No, the installer usually replaces or coexists with older versions safely.
Your system may be referencing an old version; check your PATH settings.
Yes, but avoid replacing the system default Python—install new versions separately.
We are Leapcell, your top choice for hosting Python projects.
Leapcell is the Next-Gen Serverless Platform for Web Hosting, Async Tasks, and Redis:
Multi-Language Support
- Develop with Node.js, Python, Go, or Rust.
Deploy unlimited projects for free
- pay only for usage — no requests, no charges.
Unbeatable Cost Efficiency
- Pay-as-you-go with no idle charges.
- Example: $25 supports 6.94M requests at a 60ms average response time.
Streamlined Developer Experience
- Intuitive UI for effortless setup.
- Fully automated CI/CD pipelines and GitOps integration.
- Real-time metrics and logging for actionable insights.
Effortless Scalability and High Performance
- Auto-scaling to handle high concurrency with ease.
- Zero operational overhead — just focus on building.
Explore more in the Documentation!
Follow us on X: @LeapcellHQ