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:
--no-site-packages
option--prompt=PROMPT
If there are any other differences that I was unable to spot, please write them here.
It is generally good to have one new virtual environment for every Python based project you work on. So the dependencies of every project are isolated from the system and each other. How does a virtual environment work?
Virtualenv is only installed on DreamHost servers for Python 2. If you're working with Python 3, you must install virtualenv using pip3. pip3 is not installed on the server by default. You must first install a custom version of Python 3.
Starting from Python 3.3, the module venv of the Python standard library offers the users to create virtual environments. This new feature will encourage all users to create virtual environments to develop their own Python applications, which is a good practice.
There are also workflow tools that simplify this process, such as Pipenv and Poetry. They create virtual environments for you without perception and then install dependencies into them. They are used by a wide range of users.
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.
for the question
--no-site-packages
is the default in both. The --system-site-packages
option exists, but it's broken python3-venv
packageWhen venv was first announced, I'd hoped that it get into maintenance mode, to provide bug fixes on the "virtualenv for old pythons", and all developments would shift focus on the stdlib venv. I'm not sure about the project goals/roadmap for virtualenv, but I'm afraid that what I hoped is not happening. So, at least for the time being, I'd keep using the original virtualenv.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With