virtualenv in PowerShell?

后端 未结 13 2096
悲&欢浪女
悲&欢浪女 2020-12-12 20:32

Hi fellow pythonistas, there seems to be a problem when virtualenv is used in PowerShell.

When I try to activate my environment in PowerShell like..

> env

13条回答
  •  被撕碎了的回忆
    2020-12-12 21:05

    Windows users

    In Powershell:

    1. Run Powershell as an administrator
    2. copy and paste this command: set-executionpolicy remotesigned
    3. Agree to the message.

    Finally, Run

    your_virtualenv_name\Scripts\activate.ps1
    

    Instead of

    your_virtualenv_name\Scripts\activate.bat
    

    In CMD Just run:

    your_virtualenv_name\Scripts\activate.bat
    

提交回复
热议问题