Why does Python never add itself to the Windows path?

Ben Sizer kylotan at gmail.com
Mon Dec 25 17:48:35 EST 2006


Ross Ridge wrote:
> Ben Sizer wrote:
> > I've installed several different versions of Python across several
> > different versions of MS Windows, and not a single time was the Python
> > directory or the Scripts subdirectory added to the PATH environment
> > variable.
>
> Personally, I hate Windows applications that add themselves to the
> PATH.  So much crap gets put in there that I don't even use the default
> system PATH and just set my own explicitly.

Personally I hate programs that ask to be installed to the root folder
of my hard drive, but Python suggests that as a default too. ;)

In an ideal world, Python should operate pretty much the same across
all platforms. Unfortunately, as it stands, you need to have different
instructions for running things on Windows. eg. The standard "python
setup.py install" invocation isn't going to do a damn thing unless
you've fixed up the path beforehand. The same goes for "python
ez_setup.py", another common favourite. The scripts directory is
important too: TurboGears installs a "tg-admin" script which you're
supposed to run from your project's directory: which on Windows means
you need to type something like "c:\python24\scripts\tg-admin" each
time. Half of the people who develop on Mac and Linux don't realise or
acknowledge this. and so the instructions for using their packages
don't work for the average person new to Python who probably just ran
the Windows installer program and thought that would suffice.

> Linux distributions normally install themselves somewhere that's
> normally in the path already.  I suppose you can do the same thing on
> Windows if you want, just choose to install Python into directory
> that's already in your path.  Though installing to something like
> C:\WINDOWS\SYSTEM32 is probably not a good idea.

The Windows way is typically to install things in Program Files and
then point things there as necessary. Installing it the Linux way would
just cause a different set of problems. Adding it to the PATH variable
is not going to cause problems for the vast majority of people, and
it's far easier to edit up the PATH to remove an entry you don't want,
than to move an installed program from one place to another.

-- 
Ben Sizer




More information about the Python-list mailing list