On a clean installation of Windows 11, Python is not installed by default. However, running:
> where python.exe
C:\Users\Groot\AppData\Local\Microsoft\WindowsApps\python.exe
may still return a result.
This can be misleading.
Why This Happens
Windows 10 and Windows 11 include App Execution Aliases for certain applications, including Python. These aliases create stub executables in:
%LOCALAPPDATA%\Microsoft\WindowsApps
The WindowsApps directory is included in the PATH environment variable by default for user accounts.
Microsoft documentation:
- App execution aliases:
https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-extensions#app-execution-alias
On a modern Windows installation, a python.exe that appears under %LOCALAPPDATA%\Microsoft\WindowsApps is typically an App Execution Alias (implemented as a Windows-managed reparse-point link), not a “normal” python.exe binary. (ref)
When a machine does not have a real Python runtime installed, Windows includes a Python “shortcut executable” intended to route users to install Python via the Microsoft Store; Microsoft explicitly describes this as a Windows shortcut added to help users get Python. (ref)
After installing Python from the Store, the python /python3 commands become “real” from the user’s perspective (they launch an actual interpreter), but the WindowsApps\python.exe entry may still be an alias/link rather than the interpreter binary itself. Microsoft describes the Store install as replacing the default python /python3 commands with “real ones,” while the alias mechanism remains how Windows exposes packaged executables on PATH.
Practical Impact
This behavior can interfere with build systems or tooling that expect:
python.exeto be a real interpreterwhere python.exeto return only valid installations
If the user runs python with arguments (the common case for tools)
This is the most important nuance for build systems.
Microsoft states: running the shortcut executable with any command-line arguments returns an error code indicating that Python is not installed, and the purpose is to prevent batch files/scripts from opening the Store unexpectedly.
Practically, that means:
python --versionpython -c "print(1)"python some_script.py
…will not launch a working interpreter on a machine with only the alias present; instead they fail fast with a non-zero exit and typically emit an error message.
The widely observed console message looks like: “Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut…” (seen across tooling and support threads).
C:\Users\Groot>python -version
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases
In this case, the issue surfaced while attempting to set up Janus and needing a completely clean Python environment. To verify behavior from a true baseline:
- A new Hyper-V virtual machine was created
- Windows 11 was installed from an ISO image
- The behavior was confirmed on a fresh OS instance
Microsoft documentation on Hyper-V:
- Hyper-V overview:
https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/hyper-v-overview
This distinction is subtle but important when working with clean environments, reproducible builds, or automated configuration scripts.
The details in the topic were checked using ChatGPT Deep Research an then manually verified as accurate.

