0

Hello I'm very new to python and programming over all and I'm getting this error

>>> python C:\Users\Spravce\Desktop\hello1.py
  File "<stdin>", line 1
    python C:\Users\Spravce\Desktop\hello1.py
           ^
SyntaxError: invalid syntax
ChrisMM
  • 8,448
  • 13
  • 29
  • 48
  • Does this answer your question? [How to execute Python scripts with python command](https://stackoverflow.com/questions/50305764/how-to-execute-python-scripts-with-python-command) – DYZ Dec 15 '19 at 00:33

1 Answers1

0

You are trying to run python inside the Python Interactive Shell

https://docs.python.org/3/tutorial/interpreter.html#interactive-mode

exit from it using command quit() and run your command in the system shell instead :)

Alexandr Shurigin
  • 3,921
  • 1
  • 13
  • 25