Unable to upgrade to python 3.6 from python 2.7
You don't need to run brew install python3 to install Python 3.x anymore, as the formula python now defaults to Python 3.x. Simply run:

brew install python

to install Python 3.x.

Homebrew installed Python binary is still named python3, so running python will default to Apple Python which is still Python 2.x. To work around it, alias python to python3 by running:

alias python="python3"

and it should do the trick. You may wish to remove Homebrew installed python3 formula by running:

brew uninstall python3