-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Virtual environment from an unrelated directory gets selected #21825
Comments
Can I please get a screenshot of the interpreter list right after step 2 when Btw here's how we automatically choose environments: official documentation. If a local venv is present, we ideally should be choosing that. |
For #21825 On codespaces, it was leading to workspace environments not being displayed, which could mess up auto-selection.
I can confirm that "⭐" appears next to the interpreter which is expected to be selected (
|
My guess is, We can look into improving this experience if that's the case. |
For microsoft#21825 On codespaces, it was leading to workspace environments not being displayed, which could mess up auto-selection.
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Filed on behalf of @gvanrossum ...
Behaviour
Expected vs. Actual
When I open a repo directory (I use the command line:
code ~/<dirname>/
), a seemingly random venv gets activated. What I want is: either a venv with a standard name (e.g. 'venv' or '.venv') in that repo (whether or not it's managed by git) is activated, or possibly a venv with a standard name from my home directory (e.g. ~/venv or ~/.venv). But what I get is a venv in some other repo that I might have last opened days or weeks ago gets activated. And sometimes no venv gets activated. I don't know how to control what happens, which is probably the most frustrating part.Steps to reproduce:
Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
The text was updated successfully, but these errors were encountered: