Install Python3
- Install brew: http://brew.sh/
- Install Python3 via brew: brew install python3
- Vertify Python3 is installed: which python3 (should be located at: /usr/local/Cellar/python3/)
Install virtualenv and virtualenvwrapper
- pip3 install virtualenv virtualenvwrapper
- create a fold to store all of the virtual environments:
cd ~
mkdir .envs
`3. setup virtualenvwrapper by putting the following into .bash_profile:
export WORKON_HOME=~/.envs # point to the .envs fold created above
export VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python3/3.5.2_1/bin/python3 # make sure this is the python version you want to point to
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
source /usr/local/bin/virtualenvwrapper.sh
Then run .bash_profile to reflect the chagnes:
. ~/.bash_profile
Now everythiing should be set to go:
mkvirtualenv env_name
DONE.