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?
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
type python3
on command window/ terminal window & press enter,
for exit from python type quit()
& press enter
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?
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
type python3
on command window/ terminal window & press enter,
for exit from python type quit()
& press enter