Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use python 3 on terminal Mac

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?

like image 978
tomak Avatar asked Dec 06 '25 09:12

tomak


1 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

like image 61
Kimmo Hintikka Avatar answered Dec 08 '25 21:12

Kimmo Hintikka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!