Question

Steven D'Aprano steve at pearwood.info
Tue Mar 8 18:52:00 EST 2016


On Wed, 9 Mar 2016 04:19 am, Ian Kelly wrote:

> On Mon, Mar 7, 2016 at 6:41 PM, Jon Ribbens
> <jon+usenet at unequivocal.co.uk> wrote:
>> On 2016-03-07, Ian Kelly <ian.g.kelly at gmail.com> wrote:
>>> On Mon, Mar 7, 2016 at 11:51 AM, Jon Ribbens
>>><jon+usenet at unequivocal.co.uk> wrote:
>>>> I must say that Python on Windows was a very poor experience indeed,

Indeed. Development on Windows platforms is, sadly, a second-class
experience in general compared to POSIX-compatible platforms, and Python is
no different.

That's not to say that you can't do good work on Windows, but it is harder
and most costly.


>>>> "virtualenv" does not work and "venv" refuses to create the 'activate'
>>>> shell script so does not work either
>>>
>>> I've used both of these on Windows (although not recently) and had no
>>> trouble with them. I never had a problem with venv not creating the
>>> activate.bat file.
>>
>> It's not activate.bat, it's activate (no file extension) the posix
>> shell script. I installed Git for Windows which provides bash (or
>> something that looks like it). Python venv doesn't cope with this
>> situation at all.
> 
> Well, running bash on Windows is decidedly non-standard. This is like
> installing a Python package on a Linux system and then complaining
> that it won't run under wine. I don't think that Python should be
> expected to provide an activate script for all possible shells the
> user might conceivably want to use.

Not "all possible shells", no. But it's not unreasonable for it to handle
the single most popular operating system environment in the world, Windows,
don't you think?

I'm sure that if somebody cared enough to report this on the bug tracker, it
would be fixed. Steve Dower works for Microsoft, and he's doing what he can
to improve the Python-on-Windows experience. (Microsoft actually do
consider Python to be an important, if minor, part of their development
ecosystem.)


>> 'virtualenv' works even less well, it just says:
>>
>> $ virtualenv test
>> Using base prefix 'd:\\program files (x86)\\python35-32'
>> New python executable in D:\Users\Jon
>> Ribbens\Documents\Python\test\Scripts\python.exe ERROR: The executable
>> "D:\Users\Jon Ribbens\Documents\Python\test\Scripts\python.exe" could not
>> be run: [WinError 5] Access is denied
> 
> Ah, I probably never tried using it inside a user dir. On Windows I
> typically do development in a path close to the drive root, e.g.
> C:\dev.


Am I missing something? It looks to me like a straight forward permissions
error? I don't know how difficult that is to solve on Windows, but I don't
think it has anything to do with the path itself, only the permissions of
the path.



-- 
Steven




More information about the Python-list mailing list