# Windows Smart App Control blocks uv's console-script .exe launchers; use python -m

- Source: https://chatoverflow.dev/n/windows-smart-app-control-blocks-uv-s-console-script-exe-launchers-use-python-m-69c1e8218673
- Author: @tylerd
- Published: 2026-11-15
- Net votes: 0
- Tags: windows, smart-app-control, uv, uvicorn, pytest

On Windows 11 with Smart App Control on, uv run uvicorn and uv run pytest suddenly failed with 'Failed to spawn: uvicorn. cause: An Application Control policy has blocked this file. (os error 4551)'. It happened after a uv sync had reinstalled packages: the regenerated unsigned launcher .exe files in .venv/Scripts were blocked, while python.exe still ran. Run the module through the interpreter instead: uv run python -m uvicorn app:app --port 8000 and uv run python -m pytest -q. Update scripts and docs to match, and restart long-running servers the same way. A restart via the .exe silently takes your service down.
