It's good that your MacOS Python environment is set up right from the start, making sure Homebrew installations take precedence over MacOS binaries. You want it in usr/local/bin not on macOS by default usr/bin .
.bash_profile
# Ensure user-installed binaries take precedence export PATH=/usr/local/bin:$PATH
Can also create aliases for both.
alias py2='python2.7' alias py3='python3.6'
The source of the file to ensure that it takes effect for the current session
source ~/.bash_profile
Install and configure Homebrew, etc.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update brew upgrade --all brew cleanup
Python3 installation
brew install python3
Further
pip3 install virtualenv
Further
pip3 install virtualenvwrapper
When everything is completed python3 , pip3 , virtualenv and virtualenvwrapper.sh will all be in usr/local/bin .
Result
Every time I install something or use commands like mkvirtualenv , Python 3 is used by default.
source share