Open ghost opened 3 years ago
Virtualenv is already preferred if it's installed for the active Python version or if -p
is specified: https://github.com/pyenv/pyenv-virtualenv/blob/6742d0ef108450ca607ca9db7007c4a84db06531/bin/pyenv-virtualenv#L158-L165
I guess there could be an option envvar added to prefer Virtualenv even if Venv is present.
That's because the current logic is that there's no need for Virtualenv if Venv can do the job, too -- but as per OP, there may be reasons to prefer Virtualenv regardless.
Virtualenv is already preferred if it's installed for the active Python version or if -p is specified
FWIW with pyenv==2.2.3
and pyenv-virtualenv==1.1.5
the -p
flag is invalid
EDIT: maybe I'm using it incorrectly?
pyenv virtualenv -p 3.8.12 myvenv
virtualenv includes seed packages (pip, setuptools, wheel) so creating virtualenvs with those already included is much faster than using venv and then installing them with pip. There should at least be an option to prefer virtualenv even if venv is available.