Many developers install Python on their Windows machine, and when they try to run the console command python.exe, they get the following error message:
‘python’ is not recognized as an internal or external command

We’ll show you how to install Python, and fix this error. By adding Python to the PATH environmental variable.

Install it by double clicking the Python installer setup file and follow the wizard along.

### Step 2: Add Python to the PATH Environmental Variable

Next, let’s click on the Start Menu and right click My Computer. Click on Advanced System Settings.

Then click on Environment Variables. This is where we can add Python to the PATH environmental variable.

Find the PATH variable and click Edit. You want to add Python to this PATH variable by adding ;C:\Python27 to the end of that string (or whatever the path to your Python installation is).

When you type in python in a command prompt, Windows will use the PATH environmental variable to get a list of directories to go looking for the python.exe file. Before you followed the steps here, it couldn’t find the python.exe file, hence the error.
Now that the PATH variable is set, when you execute python via the Windows console, you’ll see a familiar programming prompt.