virtualenv, as the name suggests, creates virtual Python environments. If you’re familiar with server virtualisation, virtualenv acts in a similar fashion to virtual machines in that the environments share the same physical hardware, but they’re completely separated from one another.
virtualenv is very useful for when you’re working on multiple projects or using applications that require different versions of the same module. In this post I’ll demonstrate how to install and usage of virtualenv on Windows, though the process is similar for Linux too.
If you haven’t already, install virtualenv like so:
1 2 3 4 5 6 7 8 |
C:\>pip install virtualenv Collecting virtualenv Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB) 100% |################################| 1.8MB 461kB/s Installing collected packages: virtualenv Successfully installed virtualenv-15.1.0 C:\> |