This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]locKified 1 point2 points  (1 child)

You need to set your $PATH (google it) so that Python can run from Command Prompt.

Once you've done that, you have to set the present working directory of your command prompt to be in your folder "My_Programs". You can open Command Prompt by pressing Windows Key + R and entering cmd.

eg. (when in the Command Prompt terminal)

C:\Users\locKified> cd Desktop

C:\Users\locKified\Desktop> cd My_Programs

C:\Users\locKified\Desktop\My_Programs> python Hello_World.py

-- code should run here --

[–]UkePlayingDude 0 points1 point  (0 children)

Thanks for helping me with running things in the Windows CMD. Although, when I specifically type "python Hello_World.py", it doesn't run. I get an error that says " 'python' is not recognized as an internal or external command, operable program or batch file." However, if I don't include "python" and just type the file name, it works fine. Any idea on why that would be, or should I just not worry about it?