Free | No tracking | Every fact with a source|German and English

Error / Installation

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

  1. Fastest workaround without changing settings: Open Command Prompt (CMD) instead of PowerShell and activate the environment with venv\Scripts\activate.bat.
  2. 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.
  3. Open a new PowerShell window and activate the environment again with .\venv\Scripts\Activate.ps1.
  4. If it still doesn’t work, check with Get-ExecutionPolicy -List whether 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:

Terms for this

Similar errors

Sources

Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.