Python – How to Use Python 3 When Default is Python 2.7

python

I installed python3 with homebrew and can access it with python3 command in terminal.

I'm installing a command line app that needs python3. When I try to use it it says:

Python 3.3+ required

When I do python –version it reports python 2.7.

How can I get the app to use python3?

Best Answer

If there is no other application to use the python2.7, you can use alias python to python3:

In the ~/.bashrc:

add the alias python=python3