Question

Jon Ribbens jon+usenet at unequivocal.co.uk
Thu Mar 10 06:44:10 EST 2016


On 2016-03-10, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Wed, 9 Mar 2016 12:28:30 -0000 (UTC), Jon Ribbens
><jon+usenet at unequivocal.co.uk> declaimed the following:
>>On 2016-03-09, Ian Kelly <ian.g.kelly at gmail.com> wrote:
>>> It looks like the shell environment that comes with Git for Windows is
>>> actually Windows Powershell [1], so presumably the activate.ps1 script
>>> that's already provided by venv is what's needed, not a bash script.
>>
>>This is not true. I installed Git for Windows and what it gave me was
>>"Git Bash" which as you say runs in a window titled "MINGW64".
>>
>>If I try to run the activate.ps1 script it says:
>>
>>$ env/Scripts/activate.ps1
>>env/Scripts/activate.ps1: line 1: syntax error near unexpected token `[switch]$NonDestructive'
>>env/Scripts/activate.ps1: line 1: `function global:deactivate ([switch]$NonDestructive) {'
>
> 	Which is no surprise, as .ps1 is a PowerShell script

Indeed, I was just pointing out that the shell Git for Windows
installed was definitely not Powershell (or at best, Powershell
is only one of the available options).

> http://stackoverflow.com/questions/30577271/activating-pyvenv-from-gitbash-for-windows

Yes, I tried the solution suggested there (copy the 'activate' script
from an existing Unix virtualenv) and unfortunately it didn't work
(it looked like it worked but 'pip install' still installed things in
the system packages directory not the virtualenv).



More information about the Python-list mailing list