Multiple Versions Of Python

Developing with Virtualenv by Eric on February 1, 2020

When developing you'll occasionally need more than one version of Python, Django, etc. for your various projects.  The way to have multiple versions of the same library installed on one machine is to use virtualenv.  Virtualenv creates a virtual environment where you can install a unique version of Python, Django, etc.  This is great for testing and for working on old projects where you need old versions of things.  For example, our old project at work uses Django 1.4 but the new system uses Django 1.6.  I can't run the 1.4 project with 1.6 because of all the deprecated methods and changed folder structure.  Instead, I create a virtual environment for 1.4 and another for 1.6.  This way I load the Python modules required for one project differently than the other.  In this guide I want to show you how to quickly set up a new virtual environment and install all necessary Python libraries. The first thing you'll need to do is install virtualenv.  The quickest way is by using the comma...