Windows “Running scripts is disabled on this system” Problem [Python Enviroment activation]

  1. Launch PowerShell with administrative privileges: Click on the Start menu, type “PowerShell”, right-click on “Windows PowerShell,” and select “Run as administrator”.
  2. Check the current execution policy: To verify the current policy, run the following command:
  3. Change the execution policy: To change the policy, use the `Set-ExecutionPolicy` cmdlet, followed by the desired policy. For example, to set the execution policy to RemoteSigned, run:

    You will be prompted to confirm the change. Press “Y” and then Enter to confirm.

  4. Verify the new policy: Run `Get-ExecutionPolicy` again to ensure that the policy has been changed successfully.
  5. Close and reopen the PowerShell window to apply the changes.