Skip to content

Duplicate select python interpreter in status bar #1284

Closed as not planned
Closed as not planned

Description

@ltan10

Vscode Version: 1.109.5

vscode python extension ms-python.python version: 2026.2.0

Problem:

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.

Image Image

Reproduce:

Install vscode-python-environments==1.20.1

  • Duplicate interpreter selector visible

Downgrade vscode-python-environments==1.16.0

  • No duplicate interpretor selector

Activity

  1. septatrix commented on Feb 26, 2026

    @septatrix

    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

  2. eleanorjboyd commented on Feb 27, 2026

    @eleanorjboyd
    Member

    this is very interesting- I haven't seen this problem before. Let me investigate further- thanks!

  3. eleanorjboyd commented on Feb 27, 2026

    @eleanorjboyd
    Member

    If you set python.useEnvsExtension explicitly to true do you see the duplicate go away?

  4. eleanorjboyd commented on Feb 27, 2026

    @eleanorjboyd
    Member

    also Nils K (@septatrix) - can you try changing "python-envs.terminal.autoActivationType": "shellStartup" this may fix that issue

  5. shoucandanghehe commented on Feb 27, 2026

    @shoucandanghehe

    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.setInterpreter to explicitly configure the venv for the Python extension.

  6. eleanorjboyd commented on Feb 27, 2026

    @eleanorjboyd
    Member

    glad those worked but sorry the integration / communication with basedpyright still isn't working. I will investigate there

  7. Unturned3 commented on Mar 2, 2026

    @Unturned3

    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.

  8. github-actions commented on Mar 17, 2026

    @github-actions

    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.

  9. eleanorjboyd commented on Mar 18, 2026

    @eleanorjboyd
    Member

    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!

  10. wRAR commented on Mar 19, 2026

    @wRAR

    let me know if you are still seeing that problem!

    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.

  11. wRAR commented on Mar 19, 2026

    @wRAR

    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.

  12. andrewspiers commented on Mar 23, 2026

    @andrewspiers

    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.

    Image
  13. laikoni commented on Apr 2, 2026

    @laikoni

    I'm on the most recent version 1.26.0 and the status bar shows my venv interpreter twice:

    Image

    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:

    Version: 1.114.0 (Universal)
    Commit: e7fb5e96c0730b9deb70b33781f98e2f35975036
    Date: 2026-04-01T09:27:11Z
    Electron: 39.8.3
    ElectronBuildId: 13658728
    Chromium: 142.0.7444.265
    Node.js: 22.22.1
    V8: 14.2.231.22-electron.0
    OS: Darwin arm64 24.6.0

  14. xiaosuyu1997 commented on Apr 9, 2026

    @xiaosuyu1997

    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.

  15. wRAR commented on Apr 9, 2026

    @wRAR

    Guess the reason might be the ongoing rollout of "Python Environments" extension,

    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.

  16. hmralavi commented on Apr 15, 2026

    @hmralavi

    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.

  17. edvilme commented on Apr 15, 2026

    @edvilme
    Contributor
  18. github-actions commented on May 1, 2026

    @github-actions

    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!

  19. wRAR commented on May 2, 2026

    @wRAR

    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.

  20. locked as resolved and limited conversation to collaborators on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions