If you want to run Python commands from Command Prompt, PowerShell, Windows Terminal, or other development tools, you may need to add Python to PATH in Windows 11. When Python is correctly added to PATH, you can type commands such as python or pip from almost any folder without manually entering the full Python installation location.
The good news? How to add Python to PATH in Windows 11 is easier than it sounds. You can configure PATH during Python installation, add Python manually through Windows environment variables, or fix an existing installation that Windows cannot find.
In this guide, we’ll walk through each method step by step. We’ll also explain how to check whether Python is already in PATH, fix common errors, add the Scripts folder for pip, and remove incorrect Python paths safely.
Quick Answer: How Do You Add Python to PATH in Windows 11?
The easiest method is to add Python to PATH during installation.
If Python is already installed, follow these steps:
- Find your Python installation folder.
- Copy the Python folder path.
- Open Windows Search and search for environment variables.
- Select Edit the system environment variables.
- Click Environment Variables.
- Under your user variables, select Path and click Edit.
- Click New and add the Python installation folder.
- Add the Python Scripts folder as another PATH entry.
- Click OK to save everything.
- Open a new Command Prompt and run
python --version.
If Windows displays your Python version, Python has been added successfully.
What Is PATH in Windows 11?
Before changing anything, it helps to understand what PATH actually does.
PATH is an environment variable used by Windows to locate executable programs.
Think of PATH like a list of addresses. When you type:
python
Windows searches the folders listed in PATH to find a program that matches that command.
Without Python in PATH, Windows may not know where python.exe is located.
For example, Python could be installed somewhere similar to:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\
If that folder isn’t available through PATH, you may have to enter the complete path to Python every time.
That’s inconvenient.
Adding Python to PATH tells Windows where to look.
Why Should You Add Python to PATH?
Adding Python to PATH can make everyday Python development much easier.
It allows you to:
- Run Python from Command Prompt
- Run Python from PowerShell
- Use Python in Windows Terminal
- Run
pipcommands more easily - Launch Python scripts from different folders
- Use Python with development tools
- Work with virtual environments
- Install and manage Python packages from the command line
For example, instead of entering a long path such as:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\python.exe script.py
you can simply use:
python script.py
That’s the main reason developers add Python to PATH.
Check Whether Python Is Already in PATH
Before changing your environment variables, check whether Python is already configured.
You might discover that you don’t need to change anything.
Step 1: Open Command Prompt
Press:
Windows + R
Type:
cmd
Then press Enter.
Step 2: Check the Python Version
Enter:
python --version
You can also try:
python -V
If you see something like:
Python 3.13.7
Python is available from the command line.
You can also test:
py --version
The Windows Python launcher may work even when the python command doesn’t.
Step 3: Check Python’s Location
Run:
where python
If Windows returns a real Python installation path, Python is being found through your system configuration.
You can also run:
where py
This checks for the Python launcher.
Method 1: Add Python to PATH During Installation
The easiest approach is to configure PATH while installing Python.
If you’re installing Python for the first time, this is usually the simplest option.
Step 1: Start the Python Installer
Open the Python installer you downloaded.
On the first installation screen, look for an option similar to:
Add python.exe to PATH
Select that option.
This is an important checkbox.
Step 2: Enable the PATH Option
Make sure the option to add Python to PATH is enabled before continuing.
Then select:
Install Now
The installer will install Python and configure the necessary PATH entries.
Step 3: Complete the Installation
Wait for the installation to finish.
You may see a successful installation message.
Close the installer when you’re finished.
Step 4: Open a New Command Prompt
Close any existing Command Prompt or PowerShell windows.
Then open a new one.
This matters because existing terminal sessions may not immediately recognize newly added environment variables.
Run:
python --version
If Windows displays the Python version, you’re finished.
Method 2: Add Python to PATH Manually
If Python is already installed, you don’t necessarily need to reinstall it.
You can add its folders to PATH manually.
This is particularly useful when Python was installed without enabling the PATH option.
Step 1: Find Your Python Installation
First, locate the Python installation directory.
Common installation locations include:
C:\Users\YourName\AppData\Local\Programs\Python\
You may see a folder such as:
Python313
or:
Python312
The exact folder depends on your installed Python version.
Another common location is:
C:\Program Files\Python313\
if Python was installed for all users.
Step 2: Find python.exe
Open the Python installation folder.
Look for:
python.exe
You want to add the folder containing this executable to PATH.
For example:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\
Copy this folder path.
Add Python to PATH Through Environment Variables
Now we can add the Python directory to Windows PATH.
Step 1: Open Windows Search
Press the Windows key.
Search for:
environment variables
Select:
Edit the system environment variables
Step 2: Open Environment Variables
The System Properties window will appear.
Select:
Environment Variables
You’ll see two main areas:
- User variables for your account
- System variables
For a personal Python installation, the User variables section is often the appropriate place.
Step 3: Select Path
Under User variables, locate:
Path
Select it.
Then click:
Edit
Step 4: Add the Python Folder
Click:
New
Paste the path to your Python installation.
For example:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\
Click OK.
Add the Python Scripts Folder to PATH
Adding the main Python folder is important, but you should also consider adding the Scripts directory.
The Scripts folder commonly contains command-line tools installed through pip.
For example:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\Scripts\
Add this folder as another PATH entry.
Your PATH may therefore contain entries similar to:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\
and:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\Scripts\
The exact paths will depend on your installation.
Save Your Python PATH Changes
After adding the required paths, click:
OK
Then click:
OK
again in the remaining Windows dialogs.
Your changes should now be saved.
But don’t immediately test Python in an old terminal window.
Restart Command Prompt or PowerShell
Environment variable changes generally apply to newly launched processes.
If Command Prompt was already open when you modified PATH, close it.
Then open a fresh Command Prompt.
Run:
python --version
You can also test:
pip --version
If both commands work, your PATH configuration is likely correct.
How to Verify Python PATH in Windows 11
You can inspect the PATH configuration directly.
Open Command Prompt and enter:
where python
Windows should return the location of the Python executable.
You can also use:
where pip
This helps determine which Python and pip executable Windows is actually finding.
For a more detailed PATH check, run:
echo %PATH%
You’ll see a long list of folders separated by semicolons.
Look for your Python installation and Scripts directories.
How to Add Python to PATH Using PowerShell
You can also inspect PATH from PowerShell.
Open PowerShell and run:
$env:Path
This displays the PATH available to the current PowerShell session.
To check Python, run:
python --version
Or:
Get-Command python
If Python is correctly available, PowerShell should show the command information and its location.
How to Find Python’s Installation Location
If you’re unsure where Python is installed, Windows provides several ways to find it.
Use the where Command
Open Command Prompt and run:
where python
If Python is in PATH, Windows will show its location.
Use the Python Launcher
Try:
py -0p
On installations that include the Python launcher, this can show installed Python versions and their paths.
This is especially useful if you have multiple Python versions installed.
Search Windows
You can also search your computer for:
python.exe
However, be careful when selecting a result.
Windows may contain multiple Python-related files, including files belonging to applications or development environments.
You generally want the python.exe associated with your actual Python installation.
What If python Opens the Microsoft Store?
One common Windows 11 issue occurs when you type:
python
and Windows tries to open the Microsoft Store.
This doesn’t necessarily mean Python isn’t installed.
Windows can have App execution aliases associated with Python.
Check App Execution Aliases
Open:
Settings → Apps → Advanced app settings → App execution aliases
Look for Python-related entries.
Depending on your setup, you may see aliases associated with:
- Python
- Python3
If the aliases are interfering with your existing Python installation, you may need to adjust them.
After changing the aliases, open a new terminal and test:
python --version
How to Fix “Python Is Not Recognized” in Windows 11
You may see an error similar to:
'python' is not recognized as an internal or external command
This generally means Windows cannot find Python through the current PATH.
Try these fixes in order.
Fix 1: Verify Python Is Installed
Search for Python from the Start menu.
If you can’t find it, Python may not be installed.
Fix 2: Check the Installation Folder
Find the folder containing:
python.exe
Then add that folder to PATH.
Fix 3: Add the Scripts Folder
Also add the Python Scripts directory if you need pip and other installed command-line tools.
Fix 4: Restart Your Terminal
Close Command Prompt, PowerShell, or Windows Terminal.
Open a new window and test again.
Fix 5: Restart Windows
If PATH changes still aren’t reflected correctly, restarting Windows can refresh the environment for applications.
How to Add Python to PATH for All Users
Windows allows you to configure environment variables for your individual account or for the entire system.
If you want Python available to multiple user accounts, you can add its location to the System variables PATH.
Open:
Search → Edit the system environment variables → Environment Variables
Then:
- Locate System variables.
- Select Path.
- Click Edit.
- Select New.
- Enter the Python installation directory.
- Add the Scripts directory if needed.
- Click OK on each dialog.
Be careful when editing system PATH.
Avoid deleting existing entries unless you know exactly what they do.
User PATH vs System PATH: What’s the Difference?
Understanding the two PATH locations can prevent unnecessary changes.
| PATH type | Applies to | Typical use |
|---|---|---|
| User PATH | Your Windows account | Personal Python installation |
| System PATH | All users | Shared or system-wide software |
For most personal computers, adding Python to your User PATH is sufficient.
You don’t need administrator privileges for many user-level PATH changes.
How to Add Python and Pip to PATH
Python and pip are related, but they aren’t necessarily located in exactly the same directory.
The Python executable is usually inside the main Python installation directory.
The pip.exe command is commonly inside the Scripts folder.
For example:
Python installation:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\
Scripts directory:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\Scripts\
Adding both locations can make commands such as these available:
python
and:
pip
You can test pip with:
pip --version
A useful alternative is:
python -m pip --version
Using python -m pip can be particularly helpful when multiple Python installations exist.
What If You Have Multiple Python Versions?
Multiple Python versions can make PATH confusing.
For example, you might have Python 3.11 and Python 3.13 installed simultaneously.
Running:
python
may launch one version while:
py
may give you access to another.
Check installed versions with:
py -0p
You can also check:
where python
If several results appear, Windows may have multiple Python executables available.
Avoid randomly deleting PATH entries.
Instead, determine which Python installation your projects actually need.
How to Change Which Python Version Runs
If multiple versions are installed, you can explicitly use the Python launcher.
For example:
py -3.13
can request Python 3.13 when that version is installed.
You can also use:
py -3.11
for Python 3.11.
This can be useful for testing applications against different Python versions without constantly changing your global PATH.
Should You Add Python to PATH Manually?
It depends on how Python was installed.
If you’re installing Python for the first time, enabling the installer option to add Python to PATH is usually simpler.
If Python is already installed and working correctly, you don’t need to change anything.
Manual PATH configuration is useful when:
pythonisn’t recognizedpipisn’t recognized- A development tool can’t find Python
- You installed Python without enabling PATH
- You have a custom Python installation
- You need a specific Python installation available from the terminal
The key is to avoid changing PATH unnecessarily.
Common Python PATH Mistakes to Avoid
PATH problems are often caused by simple configuration mistakes.
Adding the Wrong Folder
Don’t add a random parent folder.
Add the directory that actually contains:
python.exe
Forgetting the Scripts Folder
If python works but pip doesn’t, check whether the Python Scripts folder is in PATH.
Editing the Wrong PATH
If Python only needs to work for your account, User PATH is often enough.
Don’t modify the System PATH without a reason.
Deleting Existing PATH Entries
Never remove unrelated PATH entries simply because the list looks complicated.
Other applications may depend on them.
Testing in an Old Terminal
A terminal that was already open may not have the updated environment.
Always test from a new Command Prompt or PowerShell window.
How to Remove an Incorrect Python PATH Entry
Sometimes you may have an old Python version listed in PATH.
You can remove an outdated entry through:
Environment Variables → Path → Edit
Identify the obsolete Python folder and select Delete.
Before removing anything, make sure it actually belongs to the Python installation you no longer use.
Afterward, open a new terminal and run:
where python
Then:
python --version
This helps verify that Windows is now using the intended installation.
How to Fix pip Not Recognized After Adding Python
Suppose this works:
python --version
but this doesn’t:
pip --version
The problem may be that the Scripts directory isn’t in PATH.
Find your Python installation and locate its Scripts folder.
For example:
C:\Users\YourName\AppData\Local\Programs\Python\Python313\Scripts\
Add that folder to PATH.
Then close and reopen Command Prompt.
Test:
pip --version
If it still doesn’t work, try:
python -m pip --version
If that works, pip is installed and associated with your Python installation even if the standalone pip command isn’t available through PATH.
How to Test Python After Changing PATH
Don’t assume everything worked just because Windows accepted the new PATH entry.
Perform a quick test.
Open a new Command Prompt and run:
python --version
Then:
python
You should enter the Python interpreter.
You may see something similar to:
Python 3.13.x
>>>
Type:
print("Hello, Windows 11!")
Then press Enter.
If Python responds with:
Hello, Windows 11!
your Python installation is working.
Exit the interpreter with:
exit()
What About Virtual Environments?
If you’re working on Python projects, you’ll eventually encounter virtual environments.
A virtual environment creates an isolated Python environment for a project.
For example:
python -m venv .venv
Then you can activate it from Command Prompt:
.venv\Scripts\activate
After activation, your terminal may show something similar to:
(.venv)
at the beginning of the command prompt.
This is separate from your global Python PATH configuration.
You generally don’t need to add every virtual environment to your permanent Windows PATH.
Python PATH vs Python Launcher
Windows Python installations may provide two different ways to launch Python.
python
This command normally relies on your PATH configuration.
For example:
python script.py
py
The Python launcher can help manage multiple Python versions.
For example:
py script.py
or:
py -3.13 script.py
If py works while python doesn’t, Python may be installed correctly but the main Python executable may not be configured in PATH.
Frequently Asked Questions
How do I add Python to PATH in Windows 11?
Open Environment Variables, edit the Path variable under User variables, and add the folder containing python.exe. You should also consider adding the Python Scripts folder so commands such as pip work from the terminal.
How do I know if Python is already in PATH?
Open Command Prompt and run:
python --version
You can also run:
where python
If Windows finds the executable, Python is available through the current PATH configuration.
Where should I add Python to PATH?
Add the folder containing python.exe. You can also add its Scripts folder, which commonly contains pip.exe and other Python command-line tools.
Why does Windows say Python is not recognized?
Windows may not have the Python installation directory in PATH, Python may not be installed, or an App execution alias may be interfering. Check the installation location and PATH entries first.
Do I need to add Python to both User PATH and System PATH?
No. For many personal installations, adding Python to your User PATH is sufficient. System PATH is generally used when Python needs to be available to multiple Windows accounts.
Why does python open the Microsoft Store?
Windows may be using a Python-related App execution alias instead of your installed Python executable. Check Settings → Apps → Advanced app settings → App execution aliases and verify your Python installation and PATH.
Why does Python work but pip doesn’t?
The Python installation folder may be in PATH while the Scripts folder isn’t. Add the appropriate Scripts directory or use:
python -m pip
Can I have multiple Python versions installed?
Yes. Multiple versions can coexist. The Python launcher can help you select a specific version, while PATH determines which executable is found when you type python.
Do I need to restart my computer after changing PATH?
Usually, you only need to close and reopen Command Prompt, PowerShell, or Windows Terminal. A full restart can help if applications still don’t recognize the updated environment.
Final Thoughts: Adding Python to PATH in Windows 11
Learning how to add Python to PATH in Windows 11 is one of those small setup tasks that makes Python much easier to use.
If you’re installing Python for the first time, enable the option to add Python to PATH during installation. If Python is already installed, you can manually add the folder containing python.exe through Windows Environment Variables.
Don’t forget about the Scripts folder if you want to use commands such as pip directly from Command Prompt or PowerShell.
Once you’ve made the change, open a fresh terminal and verify everything with:
python --version
and:
pip --version
If those commands work, your Windows 11 Python environment is ready for scripts, packages, virtual environments, and development tools.
If you want, I can also make the next Windows 11 article follow this same SEO + AEO format while consolidating repetitive sections.