I want to run a python script using the terminal in macOS.
$ python main.py
I would like to have the option of switching between python 2.7 and 3.6 versions. I have installed both the versions using homebrew. When I run the above command, it runs using Python 3.6 by default, but i need to run using 2.7. How can I do it?
Thanks, Vinil