
To install Python correctly, you need three things: a copy from a trusted source, a setup your terminal can find, and a quick check that proves it runs. That's true whether you use Windows, macOS or Linux. Only the details change from one system to the next.
This guide walks through each system in turn, then brings them back together for one shared test. Along the way it explains why a single missed checkbox is a common reason a new install won't start from the terminal, and how to fix that in a minute if it happens to you.
- Get Python 3 from python.org, Homebrew, or your Linux package manager.
- On Windows, tick "Add python.exe to PATH" on the installer's first screen.
- On Linux, check for an existing Python 3 before installing anything.
- Verify with python --version or python3 --version. It should start with 3.
- Most "command not found" errors are PATH problems with quick fixes.
- 0:00Intro
- 0:23Your goal and what you need
- 1:07Download Python from python.org
- 2:01Tick Add python.exe to PATH
- 2:51Install Python on macOS
- 3:42Check for Python 3 on Linux
- 4:26Install it with your package manager
- 5:19Verify your Python version
- 6:05Fix command not found errors
- 6:54Python installed, verified, ready
- 7:34Trusted source, verified version, you're ready
Check what you need before you install Python
Start by being clear about the finish line. The goal is a working Python 3 that you can run from the terminal. Having a Python program sitting in your apps folder isn't enough. You want a command that answers when you type it. Knowing this up front makes every later step easier to follow and check.
The list of requirements is short, and you probably have everything already. Any of the three main systems will work. On a work laptop, installing software may need approval, so ask your IT team before you begin rather than halfway through.
Each system has its own steps below. Windows comes first, then Mac, then Linux. You can skip straight to yours, because all three paths meet again at the same verification step at the end.
- A computer running Windows, macOS or Linux
- An internet connection to download Python
- Permission to install software on that computer
Download the Python installer from python.org (Windows)
On Windows, the first job is getting the right installer. Open your browser and go straight to python.org, the official home of Python. Downloading from the source is the safest way to get a genuine, up-to-date copy. It also keeps you away from lookalike sites that bundle extra software or offer out-of-date versions.
On the downloads page you'll see the heading "Download the latest version" and, underneath, "Python for Windows". Click the yellow "Download Python 3" button, and the installer is saved to your Downloads folder.
Before you click, check the version number on the button. You want Python 3. Python 2 is retired, so the number should start with a 3. Then find the file in Downloads and double-click it to start setup. Take your time on the first screen, because it holds the most important option of the whole install.
- The page is python.org, not a third-party download site
- The version on the button starts with 3
- The installer file is in your Downloads folder
Tick "Add python.exe to PATH" during setup
This is the step people most often miss. When the setup window opens, look at the bottom of the very first screen, just below the big Install Now button. There's a small checkbox labelled "Add python.exe to PATH". It's easy to skip past, but it decides whether every terminal command after this one works.
Here's why it matters. PATH is the list of folders your terminal searches when you type a command. Ticking the box adds Python's folder to that list, so typing python just works. If the box is left empty, Python is still on your computer, but the terminal has no idea where to find it.
With the box ticked, click Install Now. Setup copies its files, and when it says "Setup successful" you can close the window. If you realise later that you missed the checkbox, don't worry. Run the installer again, choose to modify or reinstall, and tick the box this time. That fixes most Windows problems straight away.
- Open the installer and wait for the Setup window
- Tick "Add python.exe to PATH" before anything else
- Click Install Now and let it copy files
- Close setup once it reports "Setup successful"
Install Python on macOS with the installer or Homebrew
On a Mac you have two good options, and both give you a proper, up-to-date Python 3. Pick whichever feels more comfortable, since the result is the same.
Option A is the official installer. Go to python.org, download the macOS installer, open the package and click through the steps. No terminal is needed, which suits beginners well. Option B is Homebrew, a popular package manager for the Mac. If you already have Homebrew set up, one command does everything, and later updates are just as easy.
With Homebrew, open Terminal and type brew install python. Homebrew fetches Python, installs it and pours the ready-made "bottle". When the prompt comes back, Python 3 is installed. One habit to build now: on a Mac, the command is usually python3, not python. Plain python often isn't set up there, so adding the 3 saves confusion later.
- Choose the python.org installer or Homebrew, not both
- Use Homebrew only if it's already installed
- Type python3 rather than python on a Mac
brew install python
Check whether Python 3 is already on Linux
On Linux the first step is different: look before you install. Many Linux systems already ship with Python 3, so you may be finished in seconds without downloading anything. One quick command tells you whether there's anything to install at all.
Open a terminal and type python3 --version. If you see "Python 3" followed by numbers, it's already there. Your exact numbers will differ, and that's fine. Next, which python3 shows where it lives, usually in /usr/bin. If a version starting with 3 appears, you can skip straight to the verification step.
One important warning: leave the system Python alone. Parts of Linux itself depend on it, so never uninstall it to make room for another copy. If the version command reports that python3 isn't found, move on to the next step and install it.
- Run python3 --version before installing anything
- A version starting with 3 means you can skip ahead
- Never remove the system Python that your OS relies on
python3 --version
which python3
Install Python 3 with your Linux package manager
If that check came back empty, install Python 3 with your package manager. That's the usual Linux approach: one trusted source that installs and updates your software. You don't need a browser download, because your system already knows where to get Python safely.
On Ubuntu or Debian, first run sudo apt update to refresh the package list, then sudo apt install python3. Apt reads the package lists, sets up python3 and hands the prompt back to you. Systems built on these distributions, such as Linux Mint, use apt too, so the same two commands work there.
Fedora uses dnf instead, and the command is nearly identical: sudo dnf install python3. Only the tool name changes. In both cases, sudo asks for your password. This is the "permission to install software" from the checklist. Nothing appears on screen as you type the password, and that's normal.
- Ubuntu, Debian and Mint: sudo apt install python3
- Fedora: sudo dnf install python3
- Run sudo apt update first on apt-based systems
- Expect no characters to show while typing your password
sudo apt update
sudo apt install python3
Verify your Python version in the terminal
Whichever system you're on, every path ends at the same test. Open a terminal: Command Prompt or PowerShell on Windows, or Terminal on Mac and Linux. If this check works, the install is truly finished, not just copied onto your disk.
Type python --version, or python3 --version on Mac and Linux. You should see "Python 3" and some numbers. The key thing to look for is that the version begins with a 3. That means the correct Python answered. The exact numbers after it don't matter for this check.
To go one step further, start python3 on its own. You'll see a triple-arrow prompt, which is Python's interactive shell. Type print('hello') and Python prints hello back. Type exit() to close it. Getting that reply proves the whole install works from start to finish.
- The version output starts with Python 3
- The >>> prompt appears when you start Python
- print('hello') returns hello
python --version
python3
Fix "command not found" and PATH errors
If the check didn't go to plan, the fixes are short. Almost every failure at this stage comes down to one thing: the terminal can't find Python on its PATH. Each common message points to a specific fix.
On Windows, "'python' is not recognized" means PATH wasn't set. Reinstall and tick "Add python.exe to PATH". On Mac or Linux, "python: command not found" usually just means you should type python3 instead. If the version check shows an old Python 2.x, use python3 explicitly so the right version answers.
After any fix, close your terminal and open a new one. A window that's already open keeps the old PATH, so the fix won't show until you start fresh. Then run the version check again. If you're still stuck, copy the exact error message into a search. The precise wording usually leads straight to the answer.
- Windows "not recognized": reinstall and tick Add to PATH
- Mac/Linux "command not found": type python3
- Python 2.x showing: call python3 explicitly
- Open a new terminal after every fix
Key takeaways
- Download Python from python.org or your system's package manager.
- On Windows, tick "Add python.exe to PATH" before clicking Install Now.
- On a Mac, use the official installer or brew install python.
- On Linux, check for Python 3 first, then install it only if needed.
- Verify with python3 --version and look for a version starting with 3.
- For a PATH error, reinstall with the box ticked or use python3.
Frequently asked questions
Why does Windows say 'python' is not recognized after I installed it?
This usually means the "Add python.exe to PATH" box wasn't ticked, so the terminal doesn't know where Python lives. Run the installer again, choose modify or reinstall, and tick the box. Then open a new terminal window and check again.
Should I type python or python3?
On Windows, python is normally the command once PATH is set. On Mac and Linux, python3 is usually the one that works, because plain python often isn't set up or may point to an old version. When in doubt, try python3.
Do I need to install Python on Linux?
Often not, because many Linux systems already include Python 3. Run python3 --version first. If it shows a version starting with 3, you can go straight to verifying it. If not, install it with apt or dnf.
Can I remove the Python that came with Linux and install my own?
No. Parts of the operating system depend on the system Python, so removing it can break things. Leave it in place and install any additional software alongside it.
Is it safe to download Python from other websites?
It's best to stick with python.org or your system's package manager. Unofficial sites may bundle extra software or offer out-of-date copies, and the official sources avoid both problems.
Does it matter which Python 3 version number I see?
For this check, no. What matters is that the version starts with 3, which confirms you have Python 3 rather than the retired Python 2. The numbers after it will vary from one machine to another.