I'm just a beginner in python coding but I have an issue for which I didn't found solution. I just try to run a simple script (hello world from the tutorial) but when I right click and execute the program in the terminal I just have a reply of the terminal with "c:/......../helloworld.py" (the path of my folder to my script), and not the program in itself, which should print "hello world". So if anyone know the mistake I made please tell me ! Thank you.
-
1could you pls paste your program and your terminal outputAlbin Paul– Albin Paul2018年08月27日 09:19:13 +00:00Commented Aug 27, 2018 at 9:19
-
Are you trying to print anything? Through terminal. Change your directory to where the python file is in. Then run the the program like python <filename.py> or python3 <filename.py>Raviteja Ainampudi– Raviteja Ainampudi2018年08月27日 09:20:40 +00:00Commented Aug 27, 2018 at 9:20
-
Are you trying to execute python code in the windows terminal maybe? Try using the python shell and it should work. Otherwise you need to tell the terminal to use python to execute the script.Stef van der Zon– Stef van der Zon2018年08月27日 09:23:32 +00:00Commented Aug 27, 2018 at 9:23
1 Answer 1
You need especifi the program interpreted to run the script, for run python scripts write
python helloworld.py