1
Tamara-Lovs-MacBook-Pro:~ Tamara$
Tamara-Lovs-MacBook-Pro:~ Tamara$ 1+1
-bash: 1+1: command not found

That is what comes up when I open the terminal.

Tamara Lov is the name my Mac is registered under. I played around with some preferences but don't know to use it.

slhck
  • 235,242
tamara
  • 11

1 Answers1

6

When you open your Terminal, you will land in a so-called shell. In this case, bash is the default shell which comes with OS X and it is started for you. Bash doesn't know the command 1+1.

To actually use python, you will have to start the python interpreter first. Do that with:

python

Now you can enter your live scripts.

enter image description here

If you write some scripts using a text editor, you can run them from bash by calling the following (for example, if your script is saved under Documents):

python /Users/Tamara/Documents/your-script.py
slhck
  • 235,242