-
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 not listed #16409
Comments
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can. |
Facing the same issue. |
Sorry for the delay, can you please set the debug mode logging, you have to go to settings and change the |
Hi, we solved this issue, and we are also gradually rolling out an updated way of auto-selecting interpreters and sorting them in the "Select Interpreter" dropdown (#16520). You can opt into this experiment by adding the following to your settings.json: "python.experiments.optInto": [ If you are in this experiment and you open a Python file, the virtual environment located in your workspace should be selected. Your virtual environment should also appear at the top of the list of environments as well, since we now sort workspace environments to appear higher. Thanks |
Environment data
python.languageServer
setting: MicrosoftExpected behaviour
The Python Select Interpreter dialog is supposed to show both my globally installed Python interpreter and my virtual environment interpreter
When creating a new venv using
python -m venv env
, a system dialog that looks something like this is supposed to prompt me to select the newly created virtual environment as my main interpreter for that workspace.Actual behaviour
The Python Select Interpreter dialog only shows 1 python interpreter (3.9.5) but does not show my venv.
No prompt shows up, and I have to manually activate my virtual environment through the terminal. Even choosing my venv through the Select Interpreter dialogue does not save the path, and I have to manually enter it every time.
Steps to reproduce:
python -m venv env
(No other steps needed, but the prompt as attached above is supposed to appear now)
Logs
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: