How do I use python 3 on terminal Mac

Question:

When I run python someCode.py in my terminal, I am actually using python 2.7

I have installed python 3.6 on my Mac and would like to use it in terminal. how can I do that?

Asked By: tomak

||

Answers:

Just type python3 where you would have typed python.

For example open repl type python3 run app.py program with python3.6 type python3 app.py

Answered By: Kimmo Hintikka

type python3 on command window/ terminal window & press enter,
for exit from python type quit() & press enter

Answered By: Jitendra Nandre
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.