How to install Python
Short answer: On Windows, install the Python install manager from python.org or the Microsoft Store and run py install 3.15 in PowerShell. On macOS, use the .pkg installer from python.org or brew install python@3.15. On Linux, Python usually comes preinstalled: add what is missing with sudo apt install python3 python3-venv python3-pip on Ubuntu and Debian, or sudo dnf install python3 on Fedora. The latest version is Python 3.15.2, released on October 25, 2026. Check it in a new terminal with python --version on Windows or python3 --version on macOS and Linux.
Python is free and works the same on all three systems. What changes is how you install it and what the command is called: python and py on Windows, python3 on macOS and Linux.
On Windows, the Python install manager installs Python with a single command. Open a new terminal before you check the version, so it recognizes the python command.
Installing Python at a glance
| System | Recommended way | Command | Check it |
|---|---|---|---|
| Windows 10 and 11 | Python install manager | py install 3.15 | python --version |
| macOS | python.org installer | Open the .pkg file | python3 --version |
| macOS with Homebrew | Homebrew | brew install python@3.15 | python3.15 --version |
| Ubuntu and Debian | apt | sudo apt install python3 python3-venv python3-pip | python3 --version |
| Fedora | dnf | sudo dnf install python3 | python3 --version |
| Any system | uv | uv python install 3.15 | uv python list |
Before you start: do you already have Python?
Open a terminal and ask for the version:
python --version # Windows
python3 --version # macOS and LinuxIf it answers with a number, such as Python 3.15.2, you already have it. If your version is old, follow the guide to update Python. If Windows shows Python was not found; run without arguments to install from the Microsoft Store, Python is not installed: that message comes from a Windows shortcut, and the fix is in the errors section.
Install Python on Windows
python.org recommends the Python install manager, which installs, updates and removes versions with the py command. Open PowerShell or Windows Terminal and run:
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity
py install 3.15
py listYou can also install the Python install manager from the Microsoft Store or from python.org/downloads. Close the terminal, open a new one and check the result:
python --version
py listpy list shows every installed version. If you install another one later, py -V:3.15 runs exactly 3.15.
With the classic installer: at python.org/downloads/windows, download the 64-bit Windows installer, or ARM64 if your computer has an ARM processor. On the first screen, check Add python.exe to PATH and click Install Now. If you forgot to check it, run the installer again, choose Modify and enable Add Python to environment variables.
Install Python on macOS
macOS may come with a python3 from Apple's command line tools, usually an old version. Do not delete it: install the new version next to it.
With the python.org installer: download the macOS installer from python.org/downloads/macos, open the .pkg file and follow the steps. When it finishes, open the Python 3.15 folder in Applications and double-click Install Certificates.command, so Python can download packages over HTTPS. Check the install in a new Terminal window:
python3 --versionWith Homebrew:
brew update
brew install python@3.15
python3.15 --versionHomebrew installs the new version as python3.15. The python3 command may still point to another version, so call the new one by its full name or create a virtual environment with it.
Install Python on Linux
Almost every distribution ships Python 3 because its own tools use it. On Ubuntu and Debian, also install venv and pip, which are not always included:
sudo apt update
sudo apt install python3 python3-venv python3-pip
python3 --versionIf you need 3.15 and your Ubuntu release ships another version, use the deadsnakes PPA:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.15 python3.15-venv
python3.15 --versionOn Fedora, use sudo dnf install python3, and on Arch, sudo pacman -S python. Do not change what python3 points to with update-alternatives or a symlink: your system uses it for its own tools, and you can break them.
