You probably don't have the Python executable on your PATH
. The PATH variable tells the command interpreter where to find the commands you are issuing.
If you are on a Unix/Linux system try
/usr/bin/python
Under Windows it may vary, so find where Python (python.exe
specifically) was installed and specify that complete path to get the command to run. I think this will work though:
c:\Python27\python.exe
Under Unix issue this command at the prompt:
/usr/bin/python myprog.py arg1 arg2
Under Windows:
c:\Python27\python.exe myprog.py arg1 arg2
and it should run.
The long term solution is to add the Python directory to your PATH variable.
Since you are using Windows, this How to add python.exe to Windows PATH might be helpful. Or this page specifically for Windows 7.