Sean Sean - 1 year ago 115
Python Question

Installing and Running Python 3 in Mac OS X

I have been following this tutorial. I've used brew to install python 3 but when I try to run a simple command in the terminal:


I get the following error message:

-bash: syntax error near unexpected token `'hello''

And when I type the command:

python -V

It says that my version is 2.7.10. Any idea as to why I can't run python in the terminal / version 3 isn't showing up?

enter image description here

(The red lines on the right are crossing out myfullname$)

Answer Source

You didn't start python. You were still using the bash shell. Type python and press enter. Then you'll be using python

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download