gradle-use-python-plugin icon indicating copy to clipboard operation
gradle-use-python-plugin copied to clipboard

Use venv instead of virtualenv

Open mouradxmt opened this issue 1 year ago • 4 comments

Is there a way to use venv instead of virtualenv? override the used tool.

mouradxmt avatar Mar 10 '23 15:03 mouradxmt

No, only virtualenv supported. Initially it was required to support both pythons 2 and 3. Now its not as important, but it needs time to implement venv support. Maybe, someday I'll do it. Overall, it should not be a big problem as plugin would manage virtualenv installation and usage automatically. If there are problems with virtualenv please mention it (because I'm not aware of such problems and consider venv support as very low priority)

xvik avatar Mar 11 '23 09:03 xvik

Because starting with python 3.3, venv is included by default and does not require installing a package. and using the plugin with a new pre-installed python we won't have the requirement to install another module(virtualenv) since an alternative already exist. Use case : Being a local user of the machine with no write access to the root python version... and this instance does not have virtualenv installed.. the plugin can't install virtualenv due to permission needed. it will be nice if the plugin can use venv instead.

mouradxmt avatar Mar 11 '23 16:03 mouradxmt

Virtualenv should be installed for current user only (--user) and should not cause permission errors. But, it seems, it's not always work like that. I'll look to support venv, but later, when I have time (hopefullty this year)

xvik avatar Mar 11 '23 16:03 xvik

Thank you!

mouradxmt avatar Mar 11 '23 19:03 mouradxmt

4.0.0 released. Venv now used by default and falls back to virtualenv only if venv not found. There would be no problems with existing projects where environments were already created with virtualenv (venv/virtualenv used only for environment creation)

xvik avatar Apr 14 '24 07:04 xvik