Newest version of virtualenv (16.7.2) on python v.3.7.4 has 4 additional lines for the "activate.ps1" script, which when run on Windows10 powe
Let's have a look at that error message:
You must 'source' this script: PS> . .\ENV\Scripts\activate
Hmmmm... - PS>
is probably just the prompt, which leaves us with this:
. .\ENV\Scripts\activate
# ^
# |
# Check out this guy
That, the lonely .
in front of the path, that is the dot-source operator in powershell.
According to the documentation, it:
Runs a script in the current scope so that any functions, aliases, and variables that the script creates are added to the current scope.
I haven't had a look at virtualenv
, but I assume it'll want to define a number of variables and to ensure that these persist after the script has run, it needs to be run in the current scope.
So this is the literal command you have to run to fix it:
. .\ENV\Scripts\activate