Knowledge for the World

How to run a python script on the OSX Terminal

  • by Tyler (218)
  • Time to complete: 1 minute
1

Simply navigate to the script directory and type:

python script_name.py

This will use the python interpreter to run your script.

2

You might need to specify the full path to the python interpreter.

which python

should produce:

/usr/bin/python

So you might try running:

/usr/bin/python script_name.py