[Python-Dev] Finally fix installer to add Python to %PATH% on Windows

Paul Moore p.f.moore at gmail.com
Sun Feb 6 19:13:30 CET 2011


On 6 February 2011 17:07, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Paul Moore writes:
>
>  > "Before any existing Python directories, otherwise at the end" is the
>  > closest to what I suspect most users want (certainly it matches my
>  > preferences, and anything else would have me manually editing PATH
>  > anyway, so is of no use to me in practice).
>
> Unfortunately, what is "no use to person X in practice" is a function
> of X.  I suspect that's why this hasn't been done.

Absolutely :-) And it's also why I'm reluctant to support it - even
though I agree that not having "python" just work is a PITA.

> Specifically, it seems to me that there are use cases for each of
>
> 1.  Append (eg, if both python3 and python2 provide "python.exe", for
>    experimental use of python3).
> 2.  Prepend (actually, not a use case; just common, and therefore
>    "intuitive", practice).
> 3.  "Moore's rule" (put latest and greatest ahead of other versions
>    but not interfere with previously installed apps).

Fame at last :-)

I've seen both (1) and (2) in common use. Both have disadvantages,
particularly if you try to support multiple versions being installed
at once (something which is nearly unheard of in Windows, and hence
why no commonly used solution really does a good job of it).

I've never seen (3), and in all honesty I don't expect it to be
practical - too many special cases to consider. It was more of a straw
man example of what "do it right" might really mean...

> Maybe it should be user-configurable.

-1. Too much complexity. What I *have* seen is Oracle's "Home
Selector", which is a program installed with Oracle's software which
keeps track of which versions of Oracle you have installed, and gives
you a GUI to move them up & down in priority, or disable versions. It
then updates PATH appropriately. Ultimately, all it is in Python's
terms, is a GUI means of editing PATH, so I'm not sure it's of any
real use to us. (For Oracle, I think it fiddles with some other
registry values, so it does have some value there...)

One point - no matter what we do, we only need to consider 3.3 and
later. People using 3.2 or earlier still have to manually fix up PATH
how they want. So if we do add python to PATH in 3.3, we don't
actually have a "what if people want to install multiple versions"
issue until 3.4 comes out. I'm assuming we don't try to support
multiple maintenance releases (3.3.1 and 3.3.2) being installed at
once...

Paul.


More information about the Python-Dev mailing list