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
bug(python,venv): Global python bin being prepended when activating venv virtual environment within fish shell (works correctly in bash) #1413
Comments
I just saw #863 but I'm not sure if it's directly related since on my end it only breaks on fish, not bash |
Using shims as you mentioned in some comment solves my issue, but I guess it would be preferrable to use |
activate/shims is a tough question that has a lot of subtle differences. Personally I use neither, but I'm not a typical user. I did a writeup on this topic here: asdf-vm/asdf#1565 (comment) |
Thanks for the detailed link. My thoughts relating to shims vs hooks mostly align with yours, in pyenv it always felt a bit weird to me that "which" will always point to the same file, as well as the fact that the shims are always in the PATH. For my case it's not a huge deal since I only work with python and will usually have a specific desired version for each subdirectory I'm working in, so I'm happy to keep using shims, particularly since mise is so dang fast it makes it a nonissue. I'll keep the issue open but if you think it's a duplicate of the general PATH issue feel free to close. I am also happy to help you test any changes you might make relating to this issue so feel free to ping me :) Thanks for the awesome tool, and congrats on the new name, I like it :) (though I do have to say, runtime executor had a certain flair to it haha) |
yeah I think that a lot of it might come down to whether or not you care if |
When I had that on tasks, I have noticed the |
this is working for me:
I assume it's been fixed since posting but lmk if not |
you may want to try setting |
Describe the bug
Within fish, when activating a virtual environment created using venv, I am not able to actually use the python within the virtual environment. Instead, the available python executable stays as
.local/share/mise/installs/python/3.10/bin/python
. This is because the global python3.10 bin is being prepended to $PATH:If I delete
~/.config/mise/config.toml
which contains:and then activate my virtual environment, I get the expected behavior.
Everything works correctly from bash, even with the global python version configured.
mise doctor
outputI am attaching mise doctor for both bash and fish, in case it helps to somehow bisect the issue. I also had debug and trace enabled, let me know if you'd rather I remove those from the output.
fish
bash
Additional context
A confounding factor might be the fact that I installed fish using homebrew on linux, so my fish executable is in
/home/jovyan/bin/homebrew/bin/fish
, and I don't actually have it set as my system shell since I don't have root permissions on my system.The text was updated successfully, but these errors were encountered: