OSX Install Pip, Virtualenv & VirtualenvWrapper on Mac

To install pip, virtual environment (virtualenv, virtualenvwrapper) on OS X, do the following on the command line:

sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper

To enable the workon tab-completion feature, append the following to your profile file (located at ~/.profile):

source /usr/local/bin/virtualenvwrapper.sh

Create a directory to house the virtual environments:

mkdir ~/.virtualenvs

Create a new virtual environment for your project:

cd ~/.virtualenvs
virtualenv --no-site-packages myproject

7 comments

  1. anonymous

    To avoid the most common freeze reason while installing Xcode, kill iTunes Helper before you start.

  2. anonymous

    install easy_install with:

    wget http://python-distribute.org/distribute_setup.py

    sudo python distribute_setup.py

  3. anonymous

    Thanks.

  4. anonymous

    fyi, for mkvirtualenv, --no-site-packages is now the default

  5. anonymous

    thanks a lot

  6. anonymous

    Great concise approach to virtualenvs, thanks!

  7. anonymous

    It works!

Leave a Reply