Developing Python applications sometimes it's useful to be able to test the code with different environments, for example a particular version of Python or a specific Django version etc... Setting up many different virtual machines would be really too much work and even using a chroot environment is not what you need in some cases. Thanks to virtualenv is it possible to create a self contained Python environment with all the specific libraries you may need. Using virtualenv is very easy:
- Creating the virtual environment:
- Entering the virtual environment:
- Deactivating the virtual environment:
That's it! Once you're inside the virtual environment you will be using the Python libraries inside it. I suggest you to install all the Python libraries you need using pip.