-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Here's a description why
Venv Foldersis broken, and the time I wasted learning that fact.I cleaned up the extra virtual environments left over from my attempts to set things up. I now have only
~/pyenv/3.12. I addedpyenvto the list ofVenv Foldersaspyenv(since the setting says these are folders in my home directory. Now, when I select the interpreter, I see two entries for this same virtual environment:The behavior of these two entries differs. If I select the first one, with the leading tilde,
~/pyenv/..., then again usePython: Select Interpreter, I see the second one highlighted: the one without the tilde:Note how the text for the selected interpreter has the tilde, the highlighted one does not.
Now, if I select the second one, the one without the tilde, and again use
Python: Select Interpreter, neither of the entries are highlighted:Note that now the selected path is
./pyenv: that is, relevant to whatever VS Code's working directory happens to be. This can't be a good thing.Just to test, I tried removing my
pyenventry fromVenv Foldersand added~\pyenvinstead. Now, my virtual environment does not appear in the Python: Select Interpreter` list.So, the user has to know to select the entry with the tilde (to get an absolute path), but understand that the UI will mark the one without the tilde. I think this is just a bit confusing.
Originally posted by @paul-rogers in #24364


