Are you seeing the dreaded error message:
“Python is not recognized as an internal or external command…”
If yes, don’t worry — you’re just one small setting away from fixing it.
In this complete how-to-add-python-to-path-windows-10-a-step-by-step-guide, we’ll walk through everything you need to know about adding Python to your system PATH in Windows 10. Whether you’re a beginner learning to code or setting up a development environment, this guide will help you get Python running properly in just minutes.
Let’s get started.
What Does “Add Python to PATH” Mean?
Before we jump into steps, let’s understand what’s happening behind the scenes.
When you type:
python
in Command Prompt, Windows looks in specific directories listed in a variable called PATH.
If Python’s installation folder is not included there, Windows won’t know where to find it — and you’ll get that error message.
Think of PATH like a directory map. If Python isn’t on the map, Windows gets lost.
Why Is Adding Python to PATH Important?
Adding Python to PATH allows you to:
- Run
pythonfrom Command Prompt - Execute scripts from any folder
- Use
pipto install packages - Run virtual environments
- Work with tools like VS Code and Git
Without adding Python to PATH, you’d have to manually type the full installation path every time — which is inconvenient and inefficient.
How to Check If Python Is Already Added to PATH
Before making changes, let’s verify.
Step 1:
Press Windows + R, type:
cmd
Press Enter.
Step 2:
Type:
python --version
If you see something like:
Python 3.x.x
You’re good!
If you see:
'python' is not recognized...
Then Python is not added to PATH — let’s fix that.
How-to-Add-Python-to-Path-Windows-10-a-Step-by-Step-Guide
There are two main methods:
- Add Python during installation (recommended)
- Add Python manually through Environment Variables
We’ll cover both.
Method 1: Add Python to PATH During Installation (Easiest Way)
If you’re installing Python fresh, this is the simplest method.
Step 1: Download Python
Go to the official Python website:
https://www.python.org/downloads/
Download the latest version for Windows.
Step 2: Run the Installer
Double-click the installer file.
IMPORTANT: Before clicking Install, check this box:
✔ Add Python to PATH
This checkbox appears at the bottom of the installation window.
Step 3: Click Install Now
Once installation finishes:
- Open Command Prompt
- Type
python --version - Press Enter
If it shows the version, you’re done.
Method 2: Manually Add Python to PATH in Windows 10
Already installed Python but forgot to check the box? No problem.
Follow these steps carefully.
Step 1: Locate Your Python Installation Folder
Common locations:
C:\Users\YourName\AppData\Local\Programs\Python\Python39
OR
C:\Program Files\Python39
To find it quickly:
- Press Windows
- Search for “Python”
- Right-click → Open file location
- Right-click again → Open file location
Copy the folder path.
You also need the Scripts folder inside Python.
Example:
C:\Users\YourName\AppData\Local\Programs\Python\Python39\Scripts
Copy both paths.
Step 2: Open Environment Variables
- Press Windows + R
- Type:
sysdm.cpl
- Press Enter
- Click the Advanced tab
- Click Environment Variables
Step 3: Edit the PATH Variable
Under User variables, find:
Path
Select it and click Edit.
Step 4: Add Python Paths
Click New, then paste:
- Python installation folder
- Python Scripts folder
Example entries:
C:\Users\YourName\AppData\Local\Programs\Python\Python39\
C:\Users\YourName\AppData\Local\Programs\Python\Python39\Scripts\
Click OK on all windows.
Step 5: Restart Command Prompt
Close all Command Prompt windows.
Open a new one and type:
python --version
Success!
Should You Add Python to User PATH or System PATH?
Here’s the difference:
| Option | Works For | Requires Admin |
|---|---|---|
| User PATH | Current user only | No |
| System PATH | All users | Yes |
If you’re the only user, User PATH is perfectly fine.
How to Add pip to PATH (If It’s Not Working)
If pip isn’t recognized:
- Ensure Scripts folder is added
- Restart terminal
- Test with:
pip --version
If still not working:
python -m pip --version
Common Errors and Fixes
1. “Python Is Not Recognized”
✔ PATH not added
✔ Restart terminal
2. Wrong Python Version Running
You may have multiple versions installed.
Check:
where python
This shows all installed Python paths.
Remove unwanted versions from PATH.
3. PATH Changes Not Saving
- Ensure you click OK on all windows
- Restart PC if needed
How to Verify PATH Variable
To see current PATH:
echo %PATH%
Look for your Python directories in the output.
Advanced Tip: Using Python Launcher (py Command)
Windows installs a launcher called:
py
Try:
py --version
It can run multiple Python versions easily.
Example:
py -3.9
Adding Python to PATH Using PowerShell
You can test Python in PowerShell too:
python --version
If it works in CMD, it will work in PowerShell as well.
Why Does This Problem Happen?
Because:
- You didn’t check “Add to PATH”
- You installed Python manually
- You have multiple Python installations
- PATH variable was overwritten
It’s a common beginner mistake — and now you know how to fix it.
Best Practices for Python Installation on Windows 10
✔ Always check “Add Python to PATH”
✔ Install latest stable version
✔ Avoid installing multiple versions unless needed
✔ Use virtual environments for projects
✔ Keep pip updated
Does Adding Python to PATH Improve Performance?
No — it only allows Windows to locate Python.
It doesn’t affect speed or memory usage.
When Should You Reinstall Python Instead?
Consider reinstalling if:
- PATH fixes don’t work
- Installation is corrupted
- Multiple broken versions exist
During reinstall:
✔ Check “Add Python to PATH”
Conclusion
In this complete how-to-add-python-to-path-windows-10-a-step-by-step-guide, we covered:
- What PATH is
- Why adding Python to PATH matters
- Two easy methods to add it
- How to fix common errors
- How to verify installation
Adding Python to PATH is one of the most important steps when setting up a development environment on Windows 10.
It takes less than 5 minutes — but saves hours of frustration.
Go ahead, try the steps now, and start coding without errors!
FAQs
1. How do I know if Python is added to PATH?
Run python --version in Command Prompt. If it shows a version number, it’s added.
2. Can I add Python to PATH after installation?
Yes. Use Environment Variables to manually add it.
3. Is it safe to edit PATH variable?
Yes — just avoid deleting other entries.
4. Why does pip not work after installation?
The Scripts folder may not be added to PATH.
5. Do I need admin rights to add Python to PATH?
Only if adding it to System PATH. User PATH does not require admin access.
Summary: Key Takeaways
- PATH tells Windows where to find Python.
- Always check “Add Python to PATH” during installation.
- You can manually edit Environment Variables if needed.
- Add both Python folder and Scripts folder.
- Restart Command Prompt after changes.
- Verify with
python --version.
Now your Windows 10 system is ready for Python development — no more “not recognized” errors!