Python is the most popular programming language in the world, but on Windows it has one famous trap: you can install it perfectly and still get 'python' is not recognized in your terminal. This guide walks you through installing Python on Windows 11 the right way, adding it to PATH correctly, verifying everything works, and fixing the common errors beginners hit.

By the end, you will have the latest Python (3.15.x as of October 2026), pip, and the py launcher working from any terminal, plus a first virtual environment ready for real projects.

Prerequisites

  • Windows 11 (any recent build; the same steps work on Windows 10)
  • Administrator rights on your user account (needed only if you install for all users; a per-user install needs no admin)
  • An internet connection to download the installer from python.org
  • No prior Python installation required, but if one exists, Step 1 covers how to check it

Step 1: Check if Python is already installed

Before downloading anything, check whether Python is already on your system. Open PowerShell (press Win + X and choose Terminal or Windows PowerShell) and run:

python --version
py --version

python --version calls the interpreter directly through your PATH. py --version uses the Python Launcher, a small helper that ships with python.org installers and always finds your newest installed Python even when PATH is broken. If either command prints something like Python 3.15.0, Python is present; you can skip to Step 6 to verify and configure it.

If typing python opens the Microsoft Store instead of running Python, you have hit the infamous app-execution-alias shim. This is normal and we fix it in the troubleshooting section.

Step 2: Download the official installer from python.org

Go to python.org/downloads and click the big yellow "Download Python 3.15.x" button. Always download from python.org, never from a third-party mirror, so you get an unmodified installer. The file will look like python-3.15.0-amd64.exe (about 30 MB) and works on any 64-bit Windows 11 PC, which is virtually all of them today.

Avoid the Microsoft Store version of Python for development. It is sandboxed, stores packages in odd locations, and its PATH behavior surprises people later. The python.org installer gives you full control, which is exactly what you want.

Step 3: Run the installer — tick the PATH checkbox

Double-click the downloaded .exe. The very first screen of the installer contains the single most important checkbox of this whole guide:

  • Tick "Add python.exe to PATH" at the bottom of the installer window. This is the checkbox 90% of beginners miss, and missing it is the cause of the "not recognized" error.
  • Click "Install Now" for a quick per-user install. It puts Python in %LocalAppData%\Programs\Python\Python315 and needs no admin rights.
  • Or click "Customize installation" if you want to change the install location, install for all users (goes to C:\Program Files\Python315), or skip the documentation. On the Optional Features screen, leave pip, py launcher, and for all users selected.

Wait for the progress bar to finish, then click Close. On the success screen, click "Disable path length limit" if you see it. Windows historically caps file paths at 260 characters; lifting the limit avoids mysterious failures when Python packages create deep folder trees. It is safe to click and recommended.

Step 4: Close and reopen your terminal

This step is not optional. The installer edits your PATH environment variable, but already-open terminals never see the change. Close PowerShell/Terminal completely and open a fresh one. Every time you test a PATH fix later in this guide, remember: new terminal window, every time.

Step 5: Verify the installation

In the fresh terminal, run these three commands one by one:

python --version
pip --version
py --version

python --version should print Python 3.15.0 (or newer). pip --version confirms the package manager is present and tells you where it lives, for example pip 25.2 from C:\Users\...\Python315\Lib\site-packages\pip. py --version confirms the launcher works. If all three respond, Python is correctly installed and on PATH. Run this quick sanity check too:

python -c "print('Hello from Python on Windows 11')"

You should see Hello from Python on Windows 11 printed back. That one-liner runs Python code directly from the command line without creating a file, which is handy for quick checks.

Step 6: Upgrade pip to the latest version

The pip bundled with the installer is often a few releases behind. Upgrade it now so package installs behave predictably:

python -m pip install --upgrade pip

Using python -m pip instead of bare pip is a good habit on Windows. It guarantees you upgrade the pip that belongs to the Python you just installed, which matters once you have multiple Pythons or virtual environments. Re-run pip --version afterwards to confirm the new version.

Step 7: Add Python to PATH manually (only if you missed the checkbox)

If python --version still says "not recognized", the installer ran without the PATH option. Rather than reinstalling, add it yourself. The reliable way is the Windows GUI:

  1. Open Settings > System > About > Advanced system settings (or search "Edit the system environment variables" in the Start menu).
  2. Click Environment Variables, then under User variables select Path and click Edit.
  3. Click New and add your Python folder, e.g. C:\Users\YourName\AppData\Local\Programs\Python\Python315.
  4. Click New again and add the Scripts folder: C:\Users\YourName\AppData\Local\Programs\Python\Python315\Scripts. This second entry is what makes the pip command work.
  5. Click OK on every dialog, then close and reopen your terminal.

To confirm the entries landed, run this in a fresh PowerShell:

$env:Path -split ';' | Select-String 'Python'

This splits your PATH on semicolons and shows only the Python lines. You should see both the Python folder and its Scripts subfolder listed.

Step 8: Create your first project and virtual environment

Never install project packages into your global Python. Virtual environments give each project its own isolated package set. Try it:

mkdir hello-python
cd hello-python
python -m venv venv
.\venv\Scripts\Activate.ps1

python -m venv venv creates a folder called venv containing a private copy of Python and pip for this project. The Activate.ps1 line switches your terminal into that environment; your prompt gains a (venv) prefix so you always know which Python is active. If PowerShell refuses to run the activation script with an execution-policy error, run this once and retry:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

This allows locally created scripts to run for your user account, which is the standard fix and safe on a personal machine. With the environment active, install a real package and test it:

pip install requests
python -c "import requests; print(requests.__version__)"

The first command downloads the popular requests library into the virtual environment only. The second imports it and prints its version, proving installation and import both work. When you are done working, type deactivate to leave the environment.

Verify it worked

Run through this final checklist in a fresh terminal:

  • python --version prints a 3.15.x version from any folder
  • pip --version works and points inside your Python install
  • py -0 lists the Python versions the launcher knows about
  • python -c "import sys; print(sys.executable)" shows the path of the interpreter you are actually using
  • Creating and activating a venv works, and pip install inside it succeeds

If all five pass, your Windows 11 Python setup is complete and production-ready for learning, scripting, or real development.

Common issues and fixes

1. "'python' is not recognized as an internal or external command"

This means the terminal cannot find Python on PATH. The causes, in order of likelihood: the installer ran without the PATH checkbox, you are in a terminal that was open during the install, or the manual PATH edit went to System variables while you read User variables (or vice versa). Fix: open a brand-new terminal first. If it persists, redo Step 7 carefully and restart the terminal again.

2. Typing python opens the Microsoft Store

Windows 11 ships with "app execution aliases" — fake python.exe stubs that redirect you to the Store when no real Python is on PATH. If this happens even after a proper install, your aliases are shadowing the real interpreter. Go to Settings > Apps > Advanced app settings > App execution aliases and turn off the toggles for App Installer python.exe and python3.exe. Open a new terminal and python --version will now hit your real install.

3. pip is not recognized but python works

Your Python folder is on PATH but its Scripts subfolder is not, and that is where pip.exe lives. Add the Scripts directory to User PATH exactly as in Step 7. As an immediate workaround, python -m pip works anywhere, with or without the Scripts entry.

4. PowerShell blocks the venv activation script

Error: cannot be loaded because running scripts is disabled on this system. Windows blocks unsigned scripts by default. The fix is the one-liner from Step 8: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. Reopen the terminal and activate again. Do not "fix" this by running everything as Administrator; that just moves the problem.

5. The wrong Python runs when you have several installed

Old Anaconda installs, the Store stub, and python.org builds can all fight over the python name. Diagnose with where.exe python, which lists every python.exe on PATH in priority order — the first line wins. Use the py launcher to be explicit: py -0 lists known versions and py -3.15 launches exactly that one. For permanent cleanup, remove or reorder the unwanted entries in the PATH editor from Step 7.


A clean Python install on Windows 11 takes ten minutes, and the difference between a working setup and a broken one is almost always the PATH checkbox and a fresh terminal. Get those two right and pip, virtual environments, and every tutorial you follow from here on will just work.

If you are setting up Python for a team, a server fleet, or a production deployment and would rather have it done right the first time, XpertBees handles Windows and Linux environment setup as part of our DevOps services — reach out and we will take it from there.