virtualenv is a great way of running different Python instances in isolation from your default Python setup. Python based software often needs specific python versions and specific modules to be loaded. virtualenv allows separate instances of Python to be created on your workstation that have different custom setups.
My example is based upon installing MACS (peak caller), in particular because there are different versions that I need to run depending on the project I am working on. I am also using the Fedora Linux OS, so the installation of virtualenv will probably differ depending on your OS.
1. Install virtualenv to your OS (in this case Fedora 19)
sudo yum install python-virtualenv.noarch
2. Create a new virtualenv environment
This create a directory called
macs2_20130731 in your current directory.
3. Install Python packages needed by the program (in this case MACS)
macs2_20130731/bin/pip install numpy
pip is a Python package repository.
4. Install MACS itself from a TAR archive downloaded from the github repository
macs2_20130731/bin/pip install MACS2-18.104.22.16830731.tar.gz
5. Running the program (in this case MACS)
This method allow different instances of MACS that can be easily run in isolation from other versions. Of note I have also been able to run my own instance of GALAXY using this method.