virtualenv won't activate on windows

后端 未结 18 1670
走了就别回头了
走了就别回头了 2020-12-07 14:05

Essentially I cannot seem to activate my virtualenv environment which I create.

I\'m doing this inside of windows powershell through using

scripts\\a         


        
18条回答
  •  我在风中等你
    2020-12-07 14:43

    This worked for me:

    You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venv\Scripts\Activate.ps1:

    powershell.exe -executionpolicy unrestricted -command .\Activate.ps1 -Scope CurrentUser

    and then you can run the activate command after that.

    Note: This will only allow that specific Script to run, and only by your logged in user.

提交回复
热议问题