cookiecutter-data-science icon indicating copy to clipboard operation
cookiecutter-data-science copied to clipboard

Add venv as an environment manager option

Open nickcorona opened this issue 5 years ago • 6 comments

It's the default python virtual environment library now and ships with python 3.

nickcorona avatar Apr 21 '19 01:04 nickcorona

Good call.

various tools auto-discover “venv” and “.venv” - including IDEs like PyCharm and the (wonderful) package manager, Poetry

floer32 avatar Apr 22 '19 16:04 floer32

We don't use venv in our projects could one of you (@hangtwenty @nickcorona) point towards a resource with the basics so that it can be implemented with #162?

pjbull avatar Apr 22 '19 18:04 pjbull

Hah I was misunderstanding this thread. I thought it was talking about which directory name to use for a virtualenv if created within project. But I think OP was talking about venv vs virtualenv libraries in stdlib


From: Peter Bull [email protected] Sent: Monday, April 22, 2019 11:26 AM To: drivendata/cookiecutter-data-science Cc: Michael Floering; Mention Subject: Re: [drivendata/cookiecutter-data-science] Use venv instead of virtualenv (#164)

We don't use venv in our projects could one of you (@hangtwentyhttps://github.com/hangtwenty @nickcoronahttps://github.com/nickcorona) point towards a resource with the basics so that it can be implemented with #162https://github.com/drivendata/cookiecutter-data-science/pull/162?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/drivendata/cookiecutter-data-science/issues/164#issuecomment-485503581, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AASO7UHKBMSAT4DHFMARPI3PRX7MNANCNFSM4HHKWR4A.

floer32 avatar Apr 22 '19 21:04 floer32

Hah I was misunderstanding this thread. I thought it was talking about which directory name to use for a virtualenv if created within project. But I think OP was talking about venv vs virtualenv libraries in stdlib

Yeah, that is what I mean.

nickcorona avatar Apr 26 '19 00:04 nickcorona

The general advice is to still prefer virtualenv since it's faster, has more features and can be upgraded via pip.

Update: In most cases, "virtualenv" is still recommended over just "venv". See the https://virtualenv.pypa.io/en/stable/index.html for details, but basically (as I understand it), only the minimum functionality was migrated to venv to enable everyone to get basic native isolated environments without pip-installing anything. So if you can pip-install anything, then you might as well use virtualenv.

jamesmyatt avatar Oct 02 '20 20:10 jamesmyatt

Changing this issue to consider venv in addition_to and not instead of virtualenv. virtualenv is still popularly used and provides a superset of the functionality of venv. However, it may make sense to include venv as an option since it is part of the Python standard library.

jayqi avatar Sep 10 '23 19:09 jayqi