-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
mise + direnv (use mise) + venv; virtual env gets randomly deactivated #2362
Comments
I was running into this as well.
|
you probably just shouldn't use direnv and mise for venvs together |
@jdx Do you have alternative workflows in mind that achieve the same, like, on a per repo basis automatically (or not) activating venvs and setting up environments upon entering the repo folder? I suppose, mise can do something like this itself, but as convenient and flexible as direnv? |
if you use uv you can enable https://mise.jdx.dev/lang/python.html#python.uv_venv_auto |
Yeah, I do, thanks. The problem is that we also have repositories with multiple venvs that do not necessarily, but may, reside in the repo root dir. I'm not sure yet how to handle those. |
I think that I hit this while testing the code from direnv/direnv#1338 and I want to mention few things, hoping this this might help Mise should be incompatible with direnv and should not require direnv users to make changes to their In my case virtualenv activation only partially worked.
Related: #2023 |
I should just deprecate It's a relic from a time when direnv was much more popular and mise didn't have feature parity. There may still be some gaps with feature parity which could be addressed separately. |
I think at present the solution to this are uv_venv_auto or I see |
I'm using mise in conjunction with direnv and individual venvs for my projects. direnv is configured like
use mise
, in some places accompanied by asource .venv/bin/activate
so that changing into a subdirectory automatically activates the venv.Now, it seems like whether this works or not is rather erratic and every now and then it happens that something, I don't know if it is direnv, mise or whatever, deactivates the current venv in the midst of a terminal session, requiring me to manually activate it again.
What might cause this behavior and how do I fix it?
The text was updated successfully, but these errors were encountered: