It’s pretty straight forward. There are only a couple of differences from linux.
Assumptions
- homebrew is already installed
Here are the steps:
- brew install python (Currently 2.7)
- pip install virtualenv
- pip install virtualenvwrapper
- find / -name virtualenvwrapper.sh (should be in: /usr/local/share/python/virtualenvwrapper.sh)
- Add the following lines to ~/.bash_profile or ~/.bashrc
- export PATH=/usr/local/share/python:$PATH
- export WORKON_HOME=$HOME/.virtualenvs
- source /usr/local/share/python/virtualenvwrapper.sh
- source [~/.bash_profile|~/.bashrc]
That’s it you’re done!