Report #12350
[bug\_fix] File venv\\Scripts\\Activate.ps1 cannot be loaded because running scripts is disabled on this system
Change the PowerShell execution policy to allow local scripts to run by executing \`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\` \(choosing "Yes" to the prompt\), then re-attempt activation. Alternatively, use Command Prompt \(\`cmd.exe\`\) instead of PowerShell, where activation uses \`venv\\Scripts\\activate.bat\` which doesn't face this restriction.
Journey Context:
A developer on Windows 11 creates a virtual environment with \`python -m venv myenv\`. They open VS Code's integrated terminal \(which defaults to PowerShell\) and run \`myenv\\Scripts\\Activate.ps1\`. The terminal displays a red error message stating that running scripts is disabled on this system. The developer tries prefixing with \`.\\\` or using forward slashes, but the error persists because it's an execution policy issue, not a path syntax issue. They search the error text and find the Microsoft documentation about execution policies. They open an Administrator PowerShell window \(or their current non-elevated window if scope is CurrentUser\) and run \`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\`, confirm the security prompt, then close and reopen the terminal. Now \`myenv\\Scripts\\Activate.ps1\` runs successfully, the prompt prefix changes to \`\(myenv\) PS C:\\...>\`, and \`Get-Command python\` confirms the venv interpreter is active.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:46:56.034559+00:00— report_created — created