[Tutor] how to change PYTHONPATH in WinPython 2.0
D-Man
dsh8290@rit.edu
Mon, 9 Apr 2001 12:17:51 -0400
In Windows 9x you can set PYTHONPATH :
o open c:\autoexec.bat with your favorite text editor (notepad
or edit will suffice)
o add this line at the bottom :
set PYTHONPATH c:\path\to\packages
o save
o reboot ( ?-p )
In WinNT or 2K you can set PYTHONPATH :
o click on Start->Settings->Control Panel->System
o click on the "Advanced" tab
o click on the "Environment Variables" button
o click on the "New" button (pick whether you want this change
for the current user only, or all users, for all users you
must have admin privilegs)
o type "PYTHONPATH" (without quotes) for the variable name
o type the value (ie c:\path\to\packages) for the value
o click the "Ok" button
o click the "Ok" button
o click the "Ok" button (once again -- all on different dialogs)
o logout
o login
In both situations, if a setting for PYTHONPATH already exists, just
append the additional paths you want separated by a ';'. (In the
first case, executing 'set PYTHONPATH ...' will override the
preexisting value. This can be overcome by using
'set PYTHONPATH %PYTHONPATH%;c:\apath' to include the old value in the
new value.)
By setting the system's environment, you will affect all programs that
don't ignore it. I suppose it's possible that PythonWin ignores the
system PYTHONPATH setting, but I would consider that to be broken and
should be reported as a bug. (I don't use PythonWin so I don't know
what it actually does).
-D