Reputation: 15
While enabling virtual environment in vscode i am getting this error it i also get same error without using python environment manager extension
& : File C:\Users\mudit\vscode\python django projects\dev\venv\Scripts\Activate.ps1 cannot be loaded. The file C:\Users\mudit\vscode\python django projects\dev\venv\Scripts\Activate.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:3
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
check out this screenshot for better understanding
Upvotes: 1
Views: 396
Reputation: 1610
Your powershell execution policy has to be updated.
Set-ExecutionPolicy RemoteSigned
in powershell should fix it
Make sure you run this command in a Powershell console which you have opened with option (right click) "Run as Administrator"
Once done, you can verify if it was set properly using command Get-ExecutionPolicy
Upvotes: 1