To install this package you previously need install python3 in your host, I use Homebrew to do it.
$ brew install python3
Later you need download and install the python pip using python3 version.
$ curl https://bootstrap.pypa.io/get-pip.py | python3
Finally you use pip3 with sudo permissions to install the virtualenvwrapper
$ sudo pip3 install virtualenvwrapper
To use it you need add some paths in your host environment, to do it please add to your .bash_profile
file the next lines.
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export WORKON_HOME=$HOME/virtualenvs
export PROJECT_HOME=$HOME/Devel
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper_lazy.sh
At the end, you can create and use your own python virtual environments, only remember that the virtualenvwrapper commands by default use python 3, by example when you make a virtualenv without define define explicitly the python version:
$ mkvirtualenv test
You will have the next output in your shell:
Using base prefix '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/Guest/virtualenvs/test/bin/python3.6
Not overwriting existing python script /Users/Guest/virtualenvs/test/bin/python (you must use /Users/Guest/virtualenvs/test/bin/python3.6)
Installing setuptools, pip, wheel...done.
(test) $
But if you want create a virtualenv with python 2 use the next sentence:
$ mkvirtualenv test2 -p python2