I want to activate my already created Python virtual environment.I used "./activate" command in the /venv/Scripts . But, then I got the following error.
.\activate: File D:\Automation_Testing_with_Azure_Pipeline\AutomationProject-v1\AutomationProject-v1\venv\Scripts\activate.ps1 cannot be loaded. The file D:\Automation_Testing_with_Azure_Pipeline\AutomationProject-v1\AutomationProject-v1\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.
My execution policy list is as below.
Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser RemoteSigned
LocalMachine RemoteSigned
I tried to change "MachinePolicy" and "UserPolicy" as well using following command.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope MachinePolicy
But,it gives this error.
Set-ExecutionPolicy : Cannot set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes must be set through Group Policy.
Can anyone please tell me how to resolve this?