Telling Windows where to find Python

From Phycas
Jump to: navigation, search

Determining whether or not there is a problem

Open a console window (Start, All Programs, Accessories, Command Prompt) and type python. If you get the Python prompt (i.e. >>>), then all is well. If instead you get something like this

'python' is not recognized as an internal or external command,
operable program or batch file.

then you have a problem. The first thing to do is reboot. If that does not solve the problem, then you can add the path to the Python executable to your Windows PATH. To do this, choose Start, then right-click My Computer and choose Properties. Click the Advanced tab, then click the Environment Variables button. Double-click the environmental variable named PATH (in the lower panel) and (assuming you have Python 2.5) add the following at the end of the text labeled ``Variable value


If you have Python 2.6, you would type instead


(Be careful to add the above text at the end and do not erase any existing text!) After pressing Ok twice to close the open dialog boxes, and after closing any open Command Prompt windows (which will still be working with the old PATH), you should be able to now start python at any new Command Prompt windows.