path to python in WinXP

Tim Chase python.list at
Tue Jan 31 12:22:28 EST 2006

> I have a real newbie question here. 

Well, as a starter, it would be helpful if you included a 
Subject: line in your spam filters flagged it and I 
almost tossed it in my bit-bucket because the subject was empty. :*)

> On WinXP I open a command line and type 'python' and get 'PYTHON' is  
> not recognized as an internal or external command,
> operable program or batch file.
> So I downloaded the Python 2.4.2 install package and installed it in XP.
> I go to a command line prompt and type 'python' and still get the  
> error. - not good.

The general problem is that in your cmd.exe/ 
environment, you don't have your PATH variable set up to point to 
the location in which the python executable is found.

If you want to do it for a single dos session, you can do the 

   c:\> path %path%;c:\path\to\python\exe

This will add the location of the python exe (in this example, 
it's in "c:\path\to\python\exe" folder...adjust accordingly for 
your install) to your path.

For a more persistant solution, go to your system properties and 
dig around for the "Environment variables" button.  I've got 
Win2k here, not XP, so I don't know the exact sequence, but here 
it is on Win2k

winkey+break   (pulls up the system properties)
"advanced" tab
"environment variables" button

On that screen, you should see the "Path" in the "System 
variables" list.  Edit it to include the above path to your 
python binaries.  Start a new command-prompt.


Alternatively, instead of running python directly, you should 
also be able to run

	c:\> start python

which will likely start it in a new window.


More information about the Python-list mailing list