venv activation blocked: running scripts is disabled on this system
PowerShell is blocking the activation script for your virtual environment.
The message
venv\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170 (deutsch: … kann nicht geladen werden, da die Ausführung von Skripts auf diesem System deaktiviert ist.)
Affects: Python, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge, TextGen (text-generation-webui), InvokeAI
Why is this happening?
On Windows PCs, the PowerShell execution policy is often set to “Restricted” by default: individual commands run, but .ps1 scripts do not. Activate.ps1 is one such script. This is a protection feature, not a defect.
How to fix it
- Fastest workaround without changing settings: Open Command Prompt (CMD) instead of PowerShell and activate the environment with
venv\Scripts\activate.bat. - Permanent solution for your user account only: Open PowerShell (without administrator rights) and run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, then confirm with J or Y. - Open a new PowerShell window and activate the environment again with
.\venv\Scripts\Activate.ps1. - If it still doesn’t work, check with
Get-ExecutionPolicy -Listwhether a higher level (for example, a Group Policy on a company PC) is overriding the setting.
Better not: Do not set the policy permanently to “Unrestricted” or “Bypass” for the whole computer; RemoteSigned for CurrentUser is enough.
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)
- 'python' is not recognized or opens the Microsoft Store
- ImportError: DLL load failed while importing …: The specified module could not be found – a Python package is missing a Windows DLL
- pip: Microsoft Visual C++ 14.0 or greater is required
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip cannot modify a file
Sources
- https://docs.python.org/3/library/venv.html
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.5
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.