Error compiling Python using Script package


When I try to compile my Python .py file in Atom using the ‘script’ package, I get an error as follows…

‘python’ is not recognized as an internal or external command,
operable program or batch file.
[Finished in 0.082s]

I read in another post earlier that I had to use the python.exe path in the script, but the post never described how to do that exactly?
Any ideas?
(I’m running Atom on Windows 32-bit)


You don’t have to do this. You can add the executable path to the top line of the script prefixed with a #! (called a shebang). That’s how a lot of scripts on Unix computers are set up. It’s quick and dirty and not cross-platform.

The better way to do it is to add the Python executable to your system path. Go to Control Panel -> System -> Advanced system settings -> Environment Variables, select PATH, edit it, and add a new line pointing to the directory where Python resides.


Thank you so much for helping me! That did the trick!