idle import problem

David C. Fox davidcfox at
Tue Sep 23 23:05:29 CEST 2003

Matthew Wilson wrote:
> Thanks -
> That's really useful.  I know how to set PYTHONPATH in unix, but how to in
> windows?

Depends on the version.  In Win9x, you put

SET PYTHONPATH=dir1;dir2;dir3

etc. in AUTOEXEC.BAT, though that won't take effect until you reboot. 
To get it to take effect the next time you start Python, use WINSET from 
a DOS window instead (which doesn't affect the current DOS shell, but 
does affect ones you open after you set it).  Note that WINSET is only 
temporary (until you restart Windows)

In WinXP, you can set environment variables by going to the Advanced tab 
of the System item in the Control Panel, and clicking the Environment 
Variables button.  If you want to set a PYTHONPATH specific to your 
user, set it as a User variable.  If you want it to apply to all users, 
set it as a system variable (you'll need Admin privileges to do so).


More information about the Python-list mailing list