Thursday, November 28, 2013

Add python to Windows 7 DOS Path

Run Python from Window 7 DOS is not as straightforward as in Mac Os X.  You may meet this prompt if you haven't set the python path in DOS:

 C:\Users\dz2t >python
'python' is not recognized as an internal or external command,
operable program or batch file.

Here is a way to solve this problem:
click: Start --> Control Panel --> System and Security -->System

On the left side of the screen, you should be able to see 'Advanced system settings', and then click it.
Then at the bottom click 'Environment Variables'. In the System variables box, find and click something like 'Path    C:....'. Finally, in the pop 'Edit System Variable' box, you need to add the python path to the 'Variable value'. Usually add this text to the end of the box:

;C:\Python33;C:\Python33\scripts

Then from the DOS window you can evoke python directly.


No comments:

Post a Comment