Figuring out how to install Python sounds like a one-click job, and sometimes it is. But the difference between a setup that just works and one that fights you for weeks comes down to a few boring choices: where the binary lives, whether it is on your PATH, and how you isolate projects. This is the honest, step-by-step path for 2026 across all three operating systems.
What changed in 2026
Python 3.13 and 3.14 are the versions you will reach for now; anything in the 3.8 range is end-of-life and should not be your starting point. A few practical shifts matter:
- uv went mainstream. The Rust-based installer from Astral can now download and pin interpreters itself, making it a genuine alternative to pyenv.
- Windows still ships a "fake" python. Typing
python on a clean Windows box opens the Microsoft Store stub, not a real interpreter, which trips up beginners constantly.
- The free-threaded (no-GIL) build is an optional variant now. Ignore it for everyday scripts; it is for library authors and experimenters.
Version numbers and links change, so treat specifics here as directional and confirm the current release on python.org.
Choose your install method
There is no single right answer; pick based on how much you expect to juggle versions.
| Method |
Platforms |
Multiple versions |
Best for |
Watch out for |
| Official python.org installer |
Win, Mac |
Clumsy |
Beginners, one version |
PATH checkbox on Windows |
| Homebrew |
Mac, Linux |
Okay |
Mac devs already on brew |
Auto-upgrades can shift your default |
| pyenv |
Mac, Linux |
Excellent |
Anyone maintaining several projects |
Needs shell config; slower installs |
| uv |
All |
Excellent |
New projects, speed lovers |
Newer tool, smaller ecosystem history |
| System package (apt/dnf) |
Linux |
Poor |
Servers and CI |
Often lags behind latest release |
If you only need Python to learn or run one thing, the official installer is fine. If you sense you will be switching versions, start with pyenv or uv to skip a later migration.
Install on Windows
- Go to python.org, open Downloads, and grab the latest stable 64-bit installer.
- Run it. On the very first screen, tick "Add python.exe to PATH" before clicking Install. This is the most-skipped step and the cause of most "python is not recognized" errors.
- Choose "Install Now," or "Customize" to change the location.
- Open a fresh terminal (PowerShell or Windows Terminal) and run
python --version.
If Windows opens the Store instead of showing a version, the app-alias stub is intercepting you. Open Settings, search "app execution aliases," toggle off the python.exe and python3.exe entries, and reopen your terminal.
Install on macOS and Linux
macOS ships an older Python that Apple uses for its own tools. Do not build on top of it; use a manager instead.
Homebrew (macOS):
brew install python
pyenv (macOS or Linux) gives clean version switching:
pyenv install 3.13.5
pyenv global 3.13.5
After installing pyenv, add its init lines to your shell profile (~/.zshrc or ~/.bashrc) or the command will not hook into your shell.
uv (any platform) can fetch an interpreter directly:
uv python install 3.13
On Debian or Ubuntu servers, sudo apt install python3 python3-venv python3-pip works, but expect the version to trail the newest release.
Verify and isolate every project
Two commands confirm you are set:
python --version
pip --version
On macOS and Linux you may need python3 and pip3; the managers above usually make python point to the right place.
Now the step people skip and regret: never install project packages globally. Create a virtual environment per project:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
Your prompt shows the environment name, and pip install now stays local. With uv, uv venv and uv pip install do the same, faster. Type deactivate when done.
What to skip
- Do not run
sudo pip install. Modern systems block it for a reason; overwriting the OS Python breaks utilities that quietly depend on it.
- Do not install two managers that both claim
python. Homebrew Python and pyenv fighting over your PATH is a classic afternoon-eater. Pick one.
- Do not blindly copy PATH edits from old blog posts. Many predate the Store-stub behavior and the uv era and lead to dead ends.
FAQ
Do I need to uninstall the old Python first?
Usually no. Managers like pyenv and uv keep versions side by side. If manual copies feel tangled, remove the strays and standardize on one manager.
python vs python3, which do I type?
On Windows the official installer gives you python. On macOS and Linux the safe habit is python3 and pip3. When in doubt, run both and see which reports the version you expect.
Is Anaconda a better way to install Python?
For data science with heavy scientific packages, Anaconda or Miniconda can save setup pain. For general scripting it is heavier than you need, and the standard installer plus venv is simpler.
Where to go next
Once Python runs cleanly, the next step is building something real. If you are working toward an API, read API rate limiting in 2026 so your service does not fall over under load. To understand the databases those apps lean on, ACID transactions explained is a solid grounding. And when it is time to deploy, our AWS vs GCP comparison breaks down where to run your Python code and what it costs.