'python' is not recognized or opens the Microsoft Store
Windows can’t find an installed Python or redirects the command to the Microsoft Store.
The message
'python' is not recognized as an internal or external command, operable program or batch file. … (deutsch: Der Befehl "python" ist entweder falsch geschrieben oder konnte nicht gefunden werden.) – oder es öffnet sich der Microsoft Store
Affects: Python, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge, TextGen (text-generation-webui), InvokeAI
Why is this happening?
Either Python isn’t installed at all, or the installation folder isn’t in PATH. Windows also has so-called app execution aliases: if no real Python is registered, the python command opens the Store. After an installation, an already open terminal often doesn’t know the new paths yet.
How to fix it
- First check whether you even need your own Python: portable packages (for example ComfyUI Portable) and launchers like Stability Matrix or Pinokio bring their own Python.
- Close all terminals, open a new one, and test
py --versionandpython --version. - If Python isn’t installed: install the official “Python install manager” from the Microsoft Store or from python.org/downloads (both are identical). After that,
python,py, andpymanagerwill work in a new terminal. - If the Store still opens: click Start, search for “Manage app execution aliases,” and check that the aliases for “Python (default)” are turned on. If they’re already on, turn them off and back on once.
- Check the environment variables (Start, “Edit environment variables for this account”): PATH must include
%UserProfile%\AppData\Local\Microsoft\WindowsApps. - If you installed Python with the old installer from python.org, open Start > Installed Apps, select the Python version and “Modify,” and enable the option to add Python to PATH. Then open a new terminal.
Better not: Don’t copy python.exe into system folders like C:\Windows\System32, and don’t install multiple Python versions all over the place just to work around the problem.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- No matching distribution found for torch (wrong Python version)
- venv activation blocked: running scripts is disabled on this system
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip cannot modify a file
- ImportError: DLL load failed while importing …: The specified module could not be found – a Python package is missing a Windows DLL
- Path too long: Filename too long / Windows Long Path support
Sources
- https://docs.python.org/3/using/windows.html
- https://github.com/python/cpython/blob/main/Doc/using/windows.rst
- https://github.com/comfyanonymous/ComfyUI/blob/master/README.md
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.