macos – How to run Python script on terminal?
macos – How to run Python script on terminal?
You need python installed on your system. Then you can run this in the terminal in the correct directory:
python gameover.py
You can execute your file by using this:
python /Users/luca/Documents/python/gameover.py
You can also run the file by moving to the path of the file you want to run and typing:
python gameover.py
macos – How to run Python script on terminal?
This Depends on what version of python is installed on you system. See below.
If You have Python 2.* version you have to run this command
python gameover.py
But if you have Python 3.* version you have to run this command
python3 gameover.py
Because for MAC with Python version 3.* you will get command not found error
if you run python gameover.py