Virtual environments

Download python eBook


A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

This helps isolate your environments for different projects from each other and from your system libraries.


Virtual environments are sufficiently useful that they probably should be used for every project. In particular, virtual environments allow you to:

  1. Manage dependencies without requiring root access
  2. Install different versions of the same dependency, for instance when working on different projects with varying requirements
  3. Work with different python versions

Related Examples


1043 Contributors: 38
Saturday, April 8, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook