Python Language Virtual environments

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

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.

Remarks

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


Got any Python Language Question?