You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate select python interpreter in status bar #1284
vscode-python-environments version: 1.20.1
Duplicate python interpreters available in status bar, and only one of them effectively changes the interpreter.
Unsure if there are other collisions happening.
I also get two source activations when I open a terminal, the first one very quick, and the second one a bit later when I already typed stuff, messing up the input (which can be dangerous because the extension also directly executes the line afterwards). I think the second activation comes from this extension as disabling it resolved this issue. I can only assume that there is now some weird kind of incompatibility with the primary python extension
The correct venv path cannot be obtained for some extensions(such as basedpyright).
It will Received pythonPath from Python extension: /path/to/default/python.
It is necessary to use >python.setInterpreter to explicitly configure the venv for the Python extension.
What does this Python Environments extension do, in addition to the official Python vscode extension? I also noticed the two source activations when I open a terminal, and two Python interpreters shown in the status bar. I just disabled this Python Environments extension and the issue is gone. Seems like I can select interpreters through the Python extension just fine.
I do, with 1.22.0. I haven't tried any of the workarounds above, as I'm reading the last message as saying that it should work correctly out of the box.
After further tests I now have a workspace with one selector shown (but two selectors, both checked, listed in the status bar context menu), and the environment shown there as selected is not the environment returned from environments.getActiveEnvironmentPath(), as seen e.g. in the Ruff extension logs. I assume it's the one selected in the second selector, the one that is not shown.
I have just upgraded to the pre-release version ( 1.23.1079107 ) and I still have the virtual env appearing twice.
This might have fixed something else though, previously some modules installed in the virtual env were being reported as
unfindable by pylance.
I'm on the most recent version 1.26.0 and the status bar shows my venv interpreter twice:
Potentially related error: Pylance complains about an unresolvable import in the editor, even though the package is part of the venv, the interpreter is set to the respective venv (in both places ...) and the script also runs through without complaining.
Guess the reason might be the ongoing rollout of "Python Environments" extension, as most of its functions is being integrated into the "Python" extension. The duplicate status bars are provided by these two different plugins. Just uninstall "Python Environments" extension can solve the problem.
Reacted by Hamid Alavi, Rushi Chhapia and PatrickZoo
Guess the reason might be the ongoing rollout of "Python Environments" extension, as most of its functions is being integrated into the "Python" extension. The duplicate status bars are provided by these two different plugins. Just uninstall "Python Environments" extension can solve the problem.
✅ Uninstalling "Python Environments" worked for me.
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.
It's not clear so I need to assume this was closed because "the information we requested" was asking if the linked PR fixed this.
I don't know if the linked PR is included in the latest extension release but I must assume it was so I can say that the problem is not fixed for me. Unless e.g. it wasn't supposed to be fixed for workspaces having it but only for new ones.
Activity
septatrix commentedon Feb 26, 2026
I also get two
sourceactivations when I open a terminal, the first one very quick, and the second one a bit later when I already typed stuff, messing up the input (which can be dangerous because the extension also directly executes the line afterwards). I think the second activation comes from this extension as disabling it resolved this issue. I can only assume that there is now some weird kind of incompatibility with the primary python extensioneleanorjboyd commentedon Feb 27, 2026
this is very interesting- I haven't seen this problem before. Let me investigate further- thanks!
eleanorjboyd commentedon Feb 27, 2026
If you set
python.useEnvsExtensionexplicitly totruedo you see the duplicate go away?eleanorjboyd commentedon Feb 27, 2026
also Nils K (@septatrix) - can you try changing
"python-envs.terminal.autoActivationType": "shellStartup"this may fix that issueshoucandanghehe commentedon Feb 27, 2026
The problem was solved after I added the following configuration items, but a new problem emerged:
{ "python.useEnvironmentsExtension": true, "python.terminal.activateEnvInCurrentTerminal": true, "python-envs.terminal.autoActivationType": "shellStartup" }The correct venv path cannot be obtained for some extensions(such as basedpyright).
It will
Received pythonPath from Python extension: /path/to/default/python.It is necessary to use
>python.setInterpreterto explicitly configure the venv for the Python extension.eleanorjboyd commentedon Feb 27, 2026
glad those worked but sorry the integration / communication with basedpyright still isn't working. I will investigate there
Unturned3 commentedon Mar 2, 2026
What does this Python Environments extension do, in addition to the official Python vscode extension? I also noticed the two
sourceactivations when I open a terminal, and two Python interpreters shown in the status bar. I just disabled this Python Environments extension and the issue is gone. Seems like I can select interpreters through the Python extension just fine.github-actions commentedon Mar 17, 2026
Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.
ltan10, you can help us out by closing this issue if the problem no longer exists, or adding more information.
eleanorjboyd commentedon Mar 18, 2026
Hi! Check out our blog here on the new extension and its use cases: https://devblogs.microsoft.com/python/python-in-visual-studio-code-february-2026-release/
then the most recent release of the python envs extension has a fix for double activation so let me know if you are still seeing that problem!
wRAR commentedon Mar 19, 2026
I do, with 1.22.0. I haven't tried any of the workarounds above, as I'm reading the last message as saying that it should work correctly out of the box.
wRAR commentedon Mar 19, 2026
After further tests I now have a workspace with one selector shown (but two selectors, both checked, listed in the status bar context menu), and the environment shown there as selected is not the environment returned from
environments.getActiveEnvironmentPath(), as seen e.g. in the Ruff extension logs. I assume it's the one selected in the second selector, the one that is not shown.andrewspiers commentedon Mar 23, 2026
I have just upgraded to the pre-release version ( 1.23.1079107 ) and I still have the virtual env appearing twice.
This might have fixed something else though, previously some modules installed in the virtual env were being reported as
unfindable by pylance.
laikoni commentedon Apr 2, 2026
I'm on the most recent version 1.26.0 and the status bar shows my venv interpreter twice:
Potentially related error: Pylance complains about an unresolvable import in the editor, even though the package is part of the venv, the interpreter is set to the respective venv (in both places ...) and the script also runs through without complaining.
VS Code Version:
xiaosuyu1997 commentedon Apr 9, 2026
Guess the reason might be the ongoing rollout of "Python Environments" extension, as most of its functions is being integrated into the "Python" extension. The duplicate status bars are provided by these two different plugins. Just uninstall "Python Environments" extension can solve the problem.
wRAR commentedon Apr 9, 2026
Clearly, that's why this issue is filed against it. But these two extensions re supposed to work together correctly, and in most cases do.
hmralavi commentedon Apr 15, 2026
✅ Uninstalling "Python Environments" worked for me.
edvilme commentedon Apr 15, 2026
Should be fixed by microsoft/vscode-python#25895
github-actions commentedon May 1, 2026
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!
wRAR commentedon May 2, 2026
It's not clear so I need to assume this was closed because "the information we requested" was asking if the linked PR fixed this.
I don't know if the linked PR is included in the latest extension release but I must assume it was so I can say that the problem is not fixed for me. Unless e.g. it wasn't supposed to be fixed for workspaces having it but only for new ones.