Why does Python never add itself to the Windows path?

robert no-spam at no-spam-no-spam.invalid
Mon Jan 1 07:40:03 EST 2007


Ben Sizer wrote:
> Martin v. Löwis wrote:
> 
>> 2. Many windows users (including myself) dislike setup routines that
>>    manipulate PATH.
> 
> My opinion is that this is not as big a problem as some may feel that
> it is. Unlike Unix systems, the PATH variable is rarely used. Most

It is a big problem. 

It is not less than the majority of Python users (at least those who do things on the command line) who deal with multiple Python versions.
This would create funny PATH variables - almost a "psychic behavior with history".

I'd vote heavily against manipulating the PATH. 

Example: Just recently I had a lot of magical version problems with Borland stuff installers which by default and without question or noticeable checkboxes add naively (and multiple folders) to the PATH. And there were not just version mix-up problems - even things with same names of the C++ and the Pascal compilers and even stuff from old 16bit compilers wanted to deal with each other... 

"Default Links" - generally speaking - are by far better than PATHs regarding application level stuff.


>> if Python is to be found in PATH, it
>>    should rather be installed to a directory that is known to live
>>    on PATH (or where CreateProcess searches, anyway, such
>>    as system32). So if the installer had such a feature, it should
>>    be optional, and it should default to "off".
> 
> It's a lot more anti-social to install to system32 than to modify the
> PATH variable. How easy is it to temporarily undo an installation to a
> system directory like that? What if you still want Python in your path
> but with less precedence than some other user directory?

Uninstallation would be same as for the pythonXX.dll. 

A python(XX).exe next to the DLL would just be a natural consequence - the DLL already defined the policy. python.exe is nothing else than a DLL loader.

Windows is at all less a multi user system. I don't even know a case where two (Python) Programmers use _one_ box and then also want separate Python's - just know home mates (parasites) who occasionally share the web browser or so...

If one really wants multi user separate installations that clean, it is all necessary to create oneself something like ....\<user>\bin <user>\system32. Yet not different from Linux: a ~\bin on the PATH would be custom with most *unix default layouts also. 
Dealing with less and more precedence / PATH order is about the same issue : you have by far crossed the line from where you have to set yourself the PATH consciously. 
And multiple Python installers automatically establishing the right precedence on the PATH !? - with re.sub() :-) 

Putting a pythonXX.exe next to pythonXX.dll into system32 should be a non-q and a kind of default comfort for multi-python users.
Linking also a default python.exe into the system32 upon a (non-default) checkbox mark in the installer should be simple, clear and do everything what 99.9% want - and most "compatible" to *nix.


Robert



More information about the Python-list mailing list