Report #41331
[bug\_fix] cannot be loaded because running scripts is disabled on this system. For more information, see about\_Execution\_Policies
Run PowerShell as Administrator and execute \`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\` \(or Unrestricted, but RemoteSigned is safer\). Alternatively, use \`cmd\` to activate the virtual environment instead of PowerShell, or use \`Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\` for the current session only.
Journey Context:
The developer creates a virtual environment on Windows using \`python -m venv venv\`. They open PowerShell and try to activate it with \`.\\venv\\Scripts\\Activate.ps1\`. The command fails with an error about execution policies. The developer checks the error message and sees it's a security feature of PowerShell preventing unsigned scripts from running. They try to bypass it by using \`cmd.exe\` instead, which works but is inconvenient for their workflow. Researching the issue, they find that Windows PowerShell defaults to Restricted policy for new users. The developer opens an Administrator PowerShell window and runs \`Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\`. This allows locally created scripts \(like the venv activation script\) to run while still requiring remote scripts to be signed. After this, \`.\\venv\\Scripts\\Activate.ps1\` works correctly in new PowerShell windows without needing Administrator rights for future sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:50:59.073212+00:00— report_created — created