uv icon indicating copy to clipboard operation
uv copied to clipboard

Allow setting venv location in user level config

Open symroe opened this issue 1 year ago • 1 comments

For various reasons, I don't keep my .venv directory in the same directory as the project (as seems to be increasingly a convention and is default in uv currently).

I'm coming from using virtualenvwrapper where I could configure a WORKON_HOME as the location for the envs.

I can replicate this for each venv with something like this:

uv venv ~/.envs/$(basename "$PWD")

However I think a limitation of this is that uv isn't able to automatically activate the venv when running e.g uv sync.

It would be really nice to have the location (prefix to a directory containing them, defaulting to .) of the envs exposed in ~/.config/uv/uv.toml. This, ideally, would then be respected in other commands like uv sync.

symroe avatar Aug 22 '24 07:08 symroe

Related https://github.com/astral-sh/uv/issues/5229

symroe avatar Aug 22 '24 07:08 symroe

I think this is a duplicate of https://github.com/astral-sh/uv/issues/1495 (and #5229)

zanieb avatar Aug 22 '24 14:08 zanieb

Yep, sorry I missed that one :+1:

symroe avatar Aug 22 '24 20:08 symroe