Issue with virtualenv - cannot activate

前端 未结 25 1997
借酒劲吻你
借酒劲吻你 2020-12-04 05:20

I created a virtualenv around my project, but when I try to activate it I cannot. It might just be syntax or folder location, but I am stumped right now.

You can see

25条回答
  •  [愿得一人]
    2020-12-04 05:51

    source is a shell command designed for users running on Linux (or any Posix, but whatever, not Windows).

    On Windows, virtualenv creates a batch file, so you should run venv\Scripts\activate instead (per the virtualenv documentation on the activate script).

    Edit: The trick here for Windows is not specifying the BAT extension:

    PS C:\DEV\aProject\env\Scripts> & .\activate
    (env) PS C:\DEV\aProject\env\Scripts>

提交回复
热议问题