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

Methodology for Automatically Activating/Deactivating venvs When Changing Directories in a “uv-owned” Project #8293

Open
metersk opened this issue Oct 17, 2024 · 1 comment

Comments

@metersk
Copy link

metersk commented Oct 17, 2024

I often forget to name my virtual environments, so my prompt always displays .venv ❯ when I’m in a uv project. Occasionally, I’ll cd into another uv project without realizing that the previous virtual environment is still active.

Does anyone have a method for automatically activating the virtual environment of the current directory and deactivating it when I change to a different directory?

@metersk metersk changed the title Methodology for automatically activating/deactivating venvs when you cd in or out of a "uv-owned" dir? Methodology for Automatically Activating/Deactivating venvs When Changing Directories in a “uv-owned” Project Oct 17, 2024
@dschneiderch
Copy link

check out https://direnv.net/
there is a community-contributed hook for uv too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants