On macOS
- Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install python
brew install python@2 # for Python 2.7
brew install python # for Python 3.n
- Install virtualenv
pip install — upgrade virtualenv