[Python-Dev] New Windows installer for Python 3.5

Paul Moore p.f.moore at gmail.com
Tue Jan 6 15:15:06 CET 2015


On 6 January 2015 at 13:56, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> If we can't get PATH sorted out, we need to do something about this,
>> IMO. I don't know what (believe me, I tried to find a solution)
>> unfortunately.
>
> I personally believe we should aim to make the "Windows" section in
> the above link universal (i.e. working across *nix, Windows, and
> virtual environments). That's the only one that can feasibly be made
> universal - all the other alternatives are already known to be
> incompatible with particular scenarios.

Making it the universally recommended approach is one thing. Getting
people to actually work that way is another thing entirely :-(

Also, the "Windows recommendation" (currently) doesn't work properly
with virtualenv - there's no way to get py.exe to use "the currently
active virtualenv" (i.e., the default version from PATH). It should be
possible to fix this - the difficulty is likely to be designing a
viable interface.

As a first cut, I think py.exe should default to (in the following order):

1. The first version of Python on PATH that "looks like a virtualenv"
(need to consider both venv and virtualenv styles).
2. The default version of Python set in the ini file.
3. The latest version of Python installed on the machine (no longer
preferring Python 2 over Python 3!)

A #! line in a script being run will override all of these, of course,
as will explicit command line flags.

Does this seem reasonable? I could work on a patch if it does.

Paul


More information about the Python-Dev mailing list