Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Still no option to store virtual envs outside projects after a year

https://github.com/astral-sh/uv/issues/1495



This is the most important missing feature to me as well.

I've written a lightweight replacement script to manage named central virtual envs using the same command syntax as virtualenvwrapper. Supports tab completion for zsh and bash: https://github.com/sitic/uv-virtualenvwrapper


Inspired by this I made a similar thing for direnv: https://github.com/georgek/dotfiles/blob/01fb53619adc7269824...

A problem I have now, though, is when I I jump to def in my editor it no longer knows which venv to load because it's outside of the project. This somehow used to work with virtualenwrapper but I'm not sure how.


The UV_PROJECT_ENVIRONMENT variable can be used as a workaround: https://docs.astral.sh/uv/concepts/projects/config/#project-...


`UV_PROJECT_ENVIRONMENT` works fine for that. That's what I use for my venv-managing Fish functions: https://gist.github.com/akx/c357bbda9facbe41f08747a2622795c4




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: