Skip to content

selected python environment doesn't stick #1347

Closed

Description

@albertino87

Whenever I select a conda pyhton environment for my project (at least when using Remote SSH extension towards a Linux machine) it doesn't stick. At the next restart/reconnection it will automatically select the base conda environment.

OS: Windows 11 with Remote SSH extension towards linux machine
Python environment extension version: 1.23.10701010

Activity

  1. xrodz commented on Mar 12, 2026

    @xrodz

    Same here (not persisting conda env selection across restarts).
    For now had to disable the extension as a work-around.

    on:
    Python environment extension version: 1.23.10701014
    Conda package manager
    MacOS Tahoe 26.3.1
    VSCode 1.111.0

  2. anthonykim1 commented on Mar 13, 2026

    @anthonykim1
    Contributor

    Eleanor Boyd (@eleanorjboyd) Potentially interpreter issue from rollout

    Does this repro with Try install https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs

    Can you update Python extension, Python environment extension to latest and see if you can still repro?
    Also add "python.useEnvironmentsExtension": true, to your settings.json.

    Please file issue on https://github.com/microsoft/vscode-python-environments/issues if you see problem again,

  3. xrodz commented on Mar 13, 2026

    @xrodz

    Thanks Anthony Kim (@anthonykim1), but still not working on my end (not persisting conda env selection across restarts).
    Disabled the extension as a work-around for now.

    on:
    Python Environments extension version: 1.22.0 and/or pre-release 1.23.10701013
    Conda package manager
    MacOS Tahoe 26.3.1
    VSCode 1.111.0

  4. added
    area-environmentEnvironment, interpreter related issues.
    bugIssue identified by VS Code Team member as probable bug
    confirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.
    on Mar 13, 2026
  5. added this to the milestone on Mar 13, 2026
  6. zszhou21 commented on Mar 13, 2026

    @zszhou21

    Here is it: #603
    I ran into the same problem.

    on:

    • Conda package manager
    • Version: 1.111.0
    • Fish shell
  7. jakehlee commented on Mar 14, 2026

    @jakehlee

    I had the same problem, setting python.useEnvironmentsExtension: false at least restored my sanity. It seems to persistently select the conda environment with the latest python version, despite various attempts at preventing it from doing so in the .env or .vscode/settings.json

  8. m31317015 commented on Mar 16, 2026

    @m31317015

    I had the same problem, setting python.useEnvironmentsExtension: false at least restored my sanity.

    Have it downgraded to 1.16.0, works like a charm, if it wasn't for setting environments across workspaces I would have disabled it fr.

    It seems to persistently select the conda environment with the latest python version

    Aligns with my symptoms here.

    Version: 1.111.0 (user setup)
    Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
    Date: 2026-03-06T23:06:10Z (1 wk ago)
    Electron: 39.6.0
    ElectronBuildId: 13330601
    Chromium: 142.0.7444.265
    Node.js: 22.22.0
    V8: 14.2.231.22-electron.0
    OS: Windows_NT x64 10.0.26100

    On Remote-SSH to Ubuntu 24.04 LTS vscode-server

  9. crouchcd commented on Mar 19, 2026

    @crouchcd

    Sero Wong (@m31317015) Downgrading to 1.16.0 seems to have fixed it for me as well. I was on version 1.20.1.

  10. modified the milestones: , 1.114.0 on Mar 22, 2026
  11. eleanorjboyd commented on Mar 27, 2026

    @eleanorjboyd
    Member

    Steps

    1. Prerequisites

      • Install the latest pre-release of the Python Environments extension.
      • Have conda installed with at least two environments (e.g., base and a named env like myenv).
    2. Select a non-base conda environment

      • Open a workspace in VS Code Insiders.
      • Run Python: Select Interpreter from the Command Palette.
      • Pick a non-base conda environment (e.g., myenv).
      • Confirm the status bar shows the selected environment.
    3. Restart VS Code and verify persistence

      • Close VS Code completely.
      • Reopen VS Code on the same workspace.
      • Check the status bar — it should still show myenv, not base.
    4. Verify with an active conda env in terminal (optional)

      • In a system terminal, activate base: conda activate base.
      • From that terminal, launch VS Code: code-insiders /path/to/workspace.
      • The status bar should still show myenv (persisted selection), not base from CONDA_PREFIX.

    Expected Result

    The workspace's previously selected conda environment persists across restarts, regardless of which conda environment is active in the launching terminal.

  12. m31317015 commented on Mar 28, 2026

    @m31317015

    Expected Result

    The workspace's previously selected conda environment persists across restarts, regardless of which conda environment is active in the launching terminal.

    All of above is working, thanks for the help!

  13. jo-oikawa commented on Mar 30, 2026

    @jo-oikawa

    Confirmed this is working correctly.

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

Metadata

Metadata

Labels

area-environmentEnvironment, interpreter related issues.bugIssue identified by VS Code Team member as probable bugconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.verifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions