Is python package virtualenv necessary when I use python 3.3?

aristotelis picture aristotelis · Oct 19, 2012 · Viewed 8.8k times · Source

I was looking in Cristoph Gohlke's python packages and I noticed that there is a package Virtualenv for Python 3.3.

Since there is a package venv in the standard python library v3.3, I was wondering if there is an advantage to install this package separately.

Edit: From the documentation of both packages, virtualenv 1.8.2 and venv I can say that the venv standard library package lacks the functionality of:

  1. --no-site-packages option
  2. choice between setuptools or distribute
  3. inability to install pip, since it is not available in the default python installation
  4. no customization of prompt prefix inside the virtual environment --prompt=PROMPT

If there are any other differences that I was unable to spot, please write them here.

Answer

Robert T. McGibbon picture Robert T. McGibbon · Dec 31, 2012

Generally, the virtualenv package is not required when using python3.3 or later, since it was incorporated into the standard library via PEP 405. As you note in the question, there are some relatively small differences between the latest versions of virtualenv and the venv package in the standard library. In part (e.g. --no-site-packages) this stems from the different implementations. Since venv is in the standard library, it doesn't have to jump through some of the contorted hoops that virtualenv does in order to create a self-contained python installation, such as copying much of python's site module.

The best resource is really to read the PEP thoroughly.