I am trying to run a python program in Windows with a call like this:
python pacman.py
I have many such calls to the python program. I want to run it from windows command line. When I run this in Ubuntu it works well but when I try it in Windows, I get the following error:
'python' is not recognized as an internal or external command, operable program or batch file.
How can I run these python programs from Windows cmd?
You need to modify the Windows %PATH% environment variable. Under My Computer ‣ Properties ‣ Advanced ‣ Environment Variables, you should modify the %PATH% variable to include your Python directory, i.e. C:\Python26.
See: http://docs.python.org/2/using/windows.html#excursus-setting-environment-variables
That means Python Path isn't declared. Try this:
cd --> to pacman.py dir
C:\PythonVersion\python.exe pacman.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With