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

1

18

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?

Ruthenian answered 20/9, 2013 at 7:21 Comment(1)
It seems feasible to use virtualenvwrapper with pyvenv, but with some gotchas - railslide.io/pyvenv-virtualenvwrapper.htmlWyant
D
31

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.

Deoxyribose answered 11/10, 2013 at 7:51 Comment(5)
Wow. Not just clear and explicit, but also an answer no too far from the one I wanted to hear. Many thanks.Ruthenian
In Python 3.4, pyenv does install pip. docs.python.org/3/library/venv.htmlNautilus
Also, (in 3.3 if not earlier) pyvenv includes (links to) the system and user site-packages when the --system-site-packages option is used.Nautilus
Virtualenv DOES NOT subclass the standard library's implementation (venv module) at the time of this comment (virtualenv 1.11.x, and I imagine not 1.12.x). pyvenv as of Python 3.4 should normally install pip & setuptools (some linux distros' pythons have this disabled this currently).Gnawing
Good lord, this answer might as well be written in Chinese and I would understand basically the same amount. Not complaining about the answer itself, but on the state of virtual environments and Python (pyenv, pyenv-virtualenv, pyenv-virtualenvwrapper, pyvenv, virtualenv, virtualenvwrapper, venv, ....) Does it really need to be this difficult?Tolyl

© 2022 - 2024 — McMap. All rights reserved.