Add option for --active
flag to be used as default
#11458
Labels
enhancement
New feature or improvement to existing functionality
--active
flag to be used as default
#11458
Summary
There seems to be a lot of interest in enabling
uv
to reference virtual environments located in a central location on your computer (as opposed to in a.venv
folder located in the project's directory) (See #1495). It doesn't appear that there's an immediate plan to support this functionality (at least not through an interface that resembles those of virtualenvwrapper, pyenv, or poetry).There's a bit of workaround, however. A user can use an external virtual environment by creating it, activating it, and then adding a
--active
flag to each invocation ofuv
. It might look something like this:This workflow is fine, but it's kind of tedious remembering to add the
--active
flag all the time. Especially because if you forget to add the flag,uv
will automatically create a new.venv
folder in your project directory that you have to delete.My request is to please add the option (perhaps through an environment variable?) to make the
--active
flag the default behavior. If enabled as the default, it would make sense to raise an error message if a user tries to calluv add
(or similar applicable commands) without a virtual environment currently active.Example
No response
The text was updated successfully, but these errors were encountered: