“Python path” can mean three different things on Windows: the location of python.exe, the folders Python searches for modules (sys.path), or the Windows PATH environment variable that lets you type python in any terminal. To find the first, open Command Prompt and run where python. For the exact interpreter Python is using, run python -c "import sys; print(sys.executable)". To list every version the Python Launcher knows about, run py -0p.
Find Where python.exe Is Installed
- Press Windows key, type cmd and open Command Prompt (or open Terminal).
- Run
where python. Windows lists every python.exe it finds on PATH, in the order it will use them. The first line is the one that runs when you type python. - Run
where pyto find the Python Launcher, which is installed with the python.org installers. - In PowerShell, use
Get-Command pythoninstead; the Source column shows the full path. - Run
python -c "import sys; print(sys.executable)"to confirm the interpreter that actually starts.
What is the difference between python and py?
python runs whichever python.exe comes first on PATH. py is the Python Launcher, which can choose among installed versions, for example py -3.13.
Common Install Locations
| How Python was installed | Typical location |
|---|---|
| python.org installer, just for you | C:\Users\you\AppData\Local\Programs\Python\Python3xx |
| python.org installer, all users | C:\Program Files\Python3xx |
| Microsoft Store | An alias in AppData\Local\Microsoft\WindowsApps that points into the Store package |
| Anaconda or Miniconda | The folder chosen during setup, often in your user folder |
| Virtual environment | The environment’s Scripts folder, such as .venv\Scripts\python.exe |
Because these vary, py -0p and sys.executable are more reliable than guessing.
See Python’s Module Search Path
If imports fail, check where Python looks for packages:
python -c "import sys; print(*sys.path, sep='\n')"
The list is built from the interpreter’s own folders, the current directory, installed packages and some environment settings. It should rarely be edited by hand. Install packages with python -m pip install package so pip belongs to the same interpreter you run.
Where are pip packages installed?
Run python -m pip show package and read the Location line.
Check the Windows PATH Variable
- Search Start for environment variables and open Edit the system environment variables (or Edit environment variables for your account).
- Click Environment Variables, select Path and click Edit.
- Look for the Python folder and its Scripts subfolder. Entries higher in the list win.
The Microsoft Store Alias Trap
On a PC without Python, typing python may open the Microsoft Store instead of running anything. That comes from an app execution alias. If you installed Python from python.org and still see this, search Start for Manage app execution aliases and turn off the python.exe and python3.exe aliases, or make sure your real Python folder appears earlier in PATH.
Virtual Environments and IDEs
Activate a virtual environment before checking paths, because its interpreter lives inside the project folder. In VS Code and other editors, check the selected interpreter in the status bar or settings; it can differ from what python resolves to in a normal terminal.
If python Isn't Found or the Wrong One Runs
- “python is not recognized”: Python is not installed or not on PATH.
- Several versions appear: do not delete one until you know which applications use it. Use
py -3.12(or another version) to pick one explicitly. - Not sure Python works at all? See how to check if Python is properly installed.
Related: Open Terminal on Windows.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He is an IT specialist with over 20 years of experience, from a university help desk to small-business IT, IT management and his own consulting practice, and has written tech guides full time since 2020. Steps are checked against the current software on a real device or the maker’s official documentation. More about Kermit.