79252024

Date: 2024-12-04 16:45:42
Score: 1
Natty:
Report link

I also had issues running the activate.bat (cmd prompt ) or activate.ps1 (powershell) scripts to actually get my venv to take effect. The scripts appeared to run without issues, but just did not alter the environment at all.

It turned out to be a restricted Execution Policy and it wouldn't run those scripts because it was set to 'Restricted'. There are a few levels you can try such as RemoteSigned, meaning you can only run ones you have downloaded that are digitally signed or Bypass CurrentUser, which lets you run any scripts. You can check in a powershell that is running as an administrator by using the Get-ExecutionPolicy to see what it is, or Set-ExecutionPolicy to change it. This let me actually run the activate.ps1 script which fixed my venv issue.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sam Allen