Saturday, August 25, 2012

 

Setting up goobook in your home directory

My school uses Google Apps for education, so our email is hosted by Google. I also use mutt as my primary mail client on Linux and I love to use goobook to interface with my contacts store on Google. Ideally I would like to upgrade my goobook without worry about messing up my distributions python installation. This is where virtualenv turns out to be very useful to sandbox a python environment. In this post I will document how one can install virtualenv and goobook. These are the steps I used to setup goobook using virtualenv.
$ wget -O virtualenv-1.7.2.zip https://github.com/pypa/virtualenv/zipball/1.7.2
$ unzip virtualenv-1.7.2.zip
$ mv pypa-virtualenv-e517866 virtualenv
$ python virtualenv/virtualenv.py --distribute --no-site-packages ~/.virtualenv
$ VIRTUAL_ENV_DISABLE_PROMPT=true . ~/.virtualenv/bin/activate
$ pip install goobook

You can then edit your .bashrc and add the following lines
# source virtualev
if [ -d ~/.virtualenv ]; then
        VIRTUAL_ENV_DISABLE_PROMPT=1 source ~/.virtualenv/bin/activate
fi

Enjoy goobook installed locally without touching the distributions python installation.

This page is powered by Blogger. Isn't yours?