How do I update Python?
Short answer: To update Python, install the new version next to the one you have and point your projects to it. The latest release is Python 3.15.2, from October 25, 2026. On Windows, run py install 3.15 with the Python install manager, or download the installer from python.org. On macOS, run brew install python@3.15 or use the python.org installer. On Ubuntu, add the deadsnakes PPA and run sudo apt install python3.15; on Fedora, run sudo dnf install python3.15. Then check it with python --version and reinstall your packages with pip.
Updating Python almost never replaces the old version. Each minor version, such as 3.14 or 3.15, installs in its own folder with its own packages. So the real question is not only how to install 3.15, but how to make your terminal and your projects use it.
There are two kinds of update:
- Patch update, for example 3.15.1 to 3.15.2: bug and security fixes. It replaces the previous patch and keeps your packages. Install it whenever one comes out.
- Minor update, for example 3.14 to 3.15: new features. It installs next to the old version, and you move your projects to it one by one.
How Python is updated on each system: the Python install manager on Windows, Homebrew on macOS and the deadsnakes PPA on Ubuntu. Each one ends by checking the new version.
Update Python at a glance
| System | Recommended way | Command |
|---|---|---|
| Windows | Python install manager | py install 3.15 |
| macOS | Homebrew or the python.org installer | brew install python@3.15 |
| Ubuntu | deadsnakes PPA | sudo apt install python3.15 |
| Fedora | dnf | sudo dnf install python3.15 |
| Any system | uv | uv python install 3.15 |
Before you start, check which version you have with python --version, or python3 --version on macOS and Linux. For more detail, see how to check your Python version.
Update Python on Windows
python.org recommends the Python install manager to get Python on Windows. It installs, updates and removes versions from the terminal with the py command.
- Install the Python install manager from the Microsoft Store, from python.org/downloads or with winget:
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity- Install the new version:
py install 3.15- Check which versions you have and which one runs by default:
py list
python --versionTo get the latest patch of the versions you already have, run py install --update. It replaces each install with the newer patch and leaves your site-packages folder as it is. To run a specific version, use py -V:3.15.
Other ways on Windows
- Standalone installer: on python.org/downloads/windows, download the Windows installer (64-bit), or ARM64 if your PC has an ARM processor. Check Add python.exe to PATH on the first screen.
- Chocolatey: if you already use it, run
choco upgrade python -yin PowerShell as administrator.
Update Python on macOS
macOS includes a python3 from Apple's command line tools, usually an old version. Do not remove it: install the new version next to it.
With Homebrew:
brew update
brew install python@3.15
python3.15 --versionLater, brew upgrade python@3.15 installs the new patches of that version.
With the python.org installer: download the macOS installer from python.org/downloads/macos, open the .pkg file and follow the steps. Then run python3 --version in a new terminal.
With pyenv, if you switch versions between projects:
brew install pyenv
pyenv install 3.15.2
pyenv global 3.15.2If pyenv install fails with C compiler cannot create executables, install Apple's command line tools with xcode-select --install and try again. More details in what is pyenv and how to install it.
Update Python on Linux
Linux uses Python for its own tools, so never replace or remove the system python3. Install the new version next to it and call it by its full name, such as python3.15.
Ubuntu 22.04, 24.04 and 26.04, with the deadsnakes PPA:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.15 python3.15-venv
python3.15 --versionFedora:
sudo dnf install python3.15
python3.15 --versionUpdate Python on any system with uv
uv installs Python the same way on Windows, macOS and Linux, without touching the system version:
uv python install 3.15
uv python upgradeuv python upgrade updates every version installed with uv to its latest patch.
