Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then run the following command to ensure that there aren’t any potential problems with your environment. Some warnings (if any) are informational and not necessary actionable; it’s just a good idea to at least read through and see if anything looks out of the ordinary.
brew doctor
The following command will update to the latest version of Homebrew and its formulae:
brew update
Setup VirtualEnvs
$ pip install virtualenv
$ pip install virtualenvwrapper
Next, create a folder that will contain all your virtual environments:
$ mkdir ~/.virtualenvs
Open your .bashrc file and add:
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
you can activate these changes by typing
$ source .bashrc
you are now ready to create a virtual enviroment
$ mkvirtualenv venv # can be any name
Work on a virtual environment
$ workon venv
Deactivating is still the same
$ deactivate
To delete:
$ rmvirtualenv venv