Hello. I have been trying to run a simple script in Windows 7 DOS using the python command, but it returns this error message:
'python' is not recognized as an internal or external command, operable program, or batch file.
I've looked up how to fix on Google, but I can't find anything specifically for Windows 7 and this issue.
Please help and thank you in advance!
Hello. I have been trying to run a simple script in Windows 7 DOS using the python command
Dont call it DOS because it`s a long time since windows had DOS.
Windows 98 is the last version based on MS‑DOS.
Command Prompt is sometimes incorrectly referred to as "the DOS prompt" or as MS-DOS itself. Command Prompt is a Windows program that emulates many of the command line abilities available in MS-DOS but it is not actually MS-DOS.
So, I tried running a script and while the python command works now, it says this:
python: can't open file 'Hello_world.py' [Errno2] No such file or directory
I've tried adjusting the Path and PYTHONPATH environment variables but it won't work.
I'm not sure how to get it directed to the folder I want.
Could you post exactly what you did? You can go Advanced Editor and attach JPG screen capture of Alt-PrintScreen (which by the way works beautifully in Linux, hope Microsoft has impoved it in Windows7, I still us WindowsXP) window capture saved in file.
First I created the PYTHONPATH variable, and I put C:\python32;C:\python32\projects (where I keep my scripts). That didn't work, so I put that into the Path variable. While it got python working, it couldn't find the files I wanted to use in the projects folder.
If you are working from the command prompt, change directory to the location of your script and try again. OR stay where you are and invoke python on the full path of the script: python C:\joeflims\pywork\one\script1.py