Virtualenv is a tool to create isolated Python environments.
Let's say you're working in 2 different projects, A and B.
Project A is a web project and the team is using the following packages:
- Python 2.8.x
- Django 1.6.x
The project B is also a web project but your team is using:
- Python 2.7.x
- Django 1.4.x
The machine that you're working doesn't have any version of django, what should you do? Install django 1.4? django 1.6? If you install django 1.4 globally would be easy to point to django 1.6 to work in project A?
Virtualenv is your solution! You can create 2 different virtualenv's, one for project A and another for project B. Now, when you need to work in project A, just activate the virtualenv for project A, and vice-versa.
A better tip when using virtualenv is to install virtualenvwrapper to manage all the virtualenv's that you have, easily. It's a wrapper for creating, working, removing virtualenv's.