Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using virtualenvwrapper with Python3.3 mean I cannot (or should not) be using pyvenv?

Virtualenvwrapper is a user-friendly shell around Python's virtualenv.

Python 3.3 ships with pyvenv built into the standard library, which aims to supercede virtualenv.

But if I install Virtualenvwrapper on Python3.3, it still installs virtualenv, leading me to believe it doesn't use 'pyvenv' under the covers.

Presumably this doesn't really matter - if I wish to use virtualenvwrapper on Python3.3 I should happily let it use virtualenv instead of pyvenv, and will (for the moment) suffer no ill effects?

like image 386
Jonathan Hartley Avatar asked Sep 20 '13 07:09

Jonathan Hartley


People also ask

What is the difference between virtualenv and Virtualenvwrapper?

Virtualenvwrapper is a utility on top of virtualenv that adds a bunch of utilities that allow the environment folders to be created at a single place, instead of spreading around everywhere.

Should I use virtualenv or VENV?

These are almost completely interchangeable, the difference being that virtualenv supports older python versions and has a few more minor unique features, while venv is in the standard library.

What is Pyvenv?

pyenv – A Python version manager. Installs different versions and flavors of Python interpreters. pyvenv – A tool to create isolated virtual environments from a Python interpreter. Ships with Python from 3.4. virtualenv – Creates virtual environments, available in PyPi.


1 Answers

Sorry this answer is a bit delayed. pyvenv does not aim to supersede virtualenv, in fact virtualenv in Python 3 depends on the standard library venv module.

The pyvenv command creates an absolutely minimal virtual environment into which other packages can be installed.

The Python 3 version of virtualenv actually subclasses the standard library's implementation and provides hooks to automatically install setuptools and pip into the environment which pyvenv doesn't do on it's own.

As far as I know virtualenvwrapper depends on virtualenv only because the mkvirtualenv or mkproject commands allow you to specify packages to be installed into the new environment, this only works because virtualenv will have already installed setuptools and pip.

So to answer your question I believe you should be able to use virtualenvwrapper on environments created by pyvenv as long as you follow virtualenvwrapper's conventions for where to put things and you either manually install setuptools and pip into the environment or don't use any package management features of virtualenvwrapper.

like image 150
Beau Avatar answered Oct 25 '22 20:10

Beau