Contents
How do I run a .PY file in Terminal?
To run Python scripts with the python command, you need to open a command-line and type in the word python , or python3 if you have both versions, followed by the path to your script, just like this: $ python3 hello.py Hello World!
How do I run a python3 file in Ubuntu?
Option 1: Call the interpreter
- For Python 2: python
.py. - For Python 3: python3
.py.