Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting venv location in user level config #6413

Closed
symroe opened this issue Aug 22, 2024 · 3 comments
Closed

Allow setting venv location in user level config #6413

symroe opened this issue Aug 22, 2024 · 3 comments
Labels
configuration Settings and such duplicate This issue or pull request already exists

Comments

@symroe
Copy link

symroe commented Aug 22, 2024

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
Copy link
Author

symroe commented Aug 22, 2024

Related #5229

@charliermarsh charliermarsh added the configuration Settings and such label Aug 22, 2024
@zanieb
Copy link
Member

zanieb commented Aug 22, 2024

I think this is a duplicate of #1495 (and #5229)

@zanieb zanieb added the duplicate This issue or pull request already exists label Aug 22, 2024
@symroe
Copy link
Author

symroe commented Aug 22, 2024

Yep, sorry I missed that one 👍

@symroe symroe closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Settings and such duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants