Running Python in Windows Command Prompt

After installing Python, in Windows command prompt, you type “python”.

If you see this: ” ‘python’ is not recognized as an internal or external command, operable program or batch file.”, perform the following:
1. find the directory of your installed Python. if it is recently installed, type
dir C:\py*
you may see something like C:\Python27. otherwise, search your whole disk (Search function in your start menu) for “python.exe.

Double confirm the directory, for eg, type this in command prompt
you should see “Python 2.7.3 … ” followed by “>>>” for every new line. CTRL+Z Enter to exit.

Right click at My computer and go to Properties. Go to Advanced > Environment Variables. Then find “PATH” and click edit. append “;C:\Python27” at the back of the line.

Now every time you type “python”, “>>>” will appear!


One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s