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
Cannot switch to base conda environment in interactive window after latest updates #25814
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Jupyter server running: Local
Steps to reproduce:
Create a conda setup with many environments.
Launch a new interactive jupyter window from this extension.
Change the python kernel to the base conda environment.
Video:
Expected behaviour
Should switch to the base environment.
Actual behaviour
Switches to the last environment in the list, regardless of what's the current environment.
It does not affect saved interactive windows that were created before the latest updates to the python extension and vscode from a few weeks ago or so - not sure which one is at fault though.
Logs
Does not produce any log in the jupyter extension logs.
Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)
This looks like something related to the new Python extensoin. Jiefei Wang (@Jiefei-Wang)david-cortes If you have the Python Environments extension, please can you try to uninstall that and see if it makes a difference.
Optionally can you try to revert your Python extension to last months or month before and see if that makes a diference.
We didn't make any changes in Jupyter extension, hence this must either be caused by Python extension updates or this is an issue that has always existed or other.
Don Jayamanne (@DonJayamanne) If downgrading the Python extension, the base conda environment doesn't even show up in the menu anymore right after uninstalling:
After restarting vscode, it shows up again, but still suffers from the same problem.
Uninstalling the python environments extension solves the problem though.
I think I have a related bug.
If I Change Python: Select Interpreter to my conda interpreter, it doesn't actually change the interpreter.
This is a bit annoying because my packages are installed in the conda environment and therefore the linting doesn't work anymore. I think it started when migrating one of the python extensions because one was put to the graveyard a couple of days ago.
Next to the selected interpreter that I can't change, which is my system installation, there is a Global label. Maybe this was implemented a bit too globally? 😜
Best,
I'm having the same issue in notebooks and interpreter, though it appears to be intermittant — sometimes it works, sometimes when I select base it actually chooses whatever the closest environment is alphabetically.
I see there's still a info-needed tag on this — what more info would be helpful?
Hi,
Thanks for your work and it was interesting to read about the source of the bug in your PR.
This PR should be already integrated in code-insiders right?
Because I wanted to test the fix and I installed 1.115.0-insider 54b695e02e47a37ded9ca68a32bb0d00d4560030 and the bug remained.
Happy to assist more.
Best,
UPDATE
I switched to the pre-release version of the python environments extension (1.27.10911017) and the bug persists.
Then I saw that the PR 1412 is not yet in 1.27 is that correct?
Hi Eric Ulrich (@nahanoo), yes this fix was made in the Python Environments extension. Could you try updating to the latest pre-release version (1.27.10921013) and see if the issue persists?
If it does, what you're experiencing might be a different issue from the one that was fixed. The linked PR specifically fixed a scenario where the base conda environment gets silently replaced by a named conda environment after reloading VS Code. For example:
You have a conda installation (e.g. /miniconda3/) with the base env (e.g. Python 3.10) plus named envs like torch (e.g. Python 3.12) or data_science (e.g. Python 3.11)
You select the base conda environment as the active interpreter
You reload or restart VS Code
Instead of base, a different named env (whichever has the highest Python version) appears as active
Hi,
I witnessed the same issue.
But then I uninstalled the "Python Environments" extension (version 1.26.0), and it can switch to conda base env successfully.
Maybe there's some bug in this "Python Environments" extension.
Activity
amunger commentedon Feb 23, 2026
is this only in the interactive window? are you able to select that kernel for a notebook in VS code?
david-cortes commentedon Feb 23, 2026
Also affects notebooks.
Jiefei-Wang commentedon Feb 24, 2026
Exactly same issue here. It only affect the base environment, the other environments are fine. I'm on Windows.
DonJayamanne commentedon Feb 24, 2026
This looks like something related to the new Python extensoin.
Jiefei Wang (@Jiefei-Wang) david-cortes If you have the Python Environments extension, please can you try to uninstall that and see if it makes a difference.
Optionally can you try to revert your Python extension to last months or month before and see if that makes a diference.
We didn't make any changes in Jupyter extension, hence this must either be caused by Python extension updates or this is an issue that has always existed or other.
david-cortes commentedon Feb 25, 2026
Don Jayamanne (@DonJayamanne) If downgrading the Python extension, the base conda environment doesn't even show up in the menu anymore right after uninstalling:

After restarting vscode, it shows up again, but still suffers from the same problem.
Uninstalling the python environments extension solves the problem though.
nahanoo commentedon Feb 26, 2026
I think I have a related bug.
If I Change
Python: Select Interpreterto my conda interpreter, it doesn't actually change the interpreter.This is a bit annoying because my packages are installed in the conda environment and therefore the linting doesn't work anymore. I think it started when migrating one of the python extensions because one was put to the graveyard a couple of days ago.
Next to the selected interpreter that I can't change, which is my system installation, there is a
Globallabel. Maybe this was implemented a bit too globally? 😜Best,
nickeubank commentedon Mar 6, 2026
I'm having the same issue in notebooks and interpreter, though it appears to be intermittant — sometimes it works, sometimes when I select
baseit actually chooses whatever the closest environment is alphabetically.I see there's still a
info-neededtag on this — what more info would be helpful?3 remaining items
nahanoo commentedon Mar 24, 2026
Any news on this or proposed fixes?
jpmaterial commentedon Mar 26, 2026
I this issue too, though switching to old version of the Python extension did not help
What helped was to delete the workspace's folder under ~/AppData/Roaming/Code/User/workspaceStorage
StellaHuang95 commentedon Mar 30, 2026
jpmaterial, Eric Ulrich (@nahanoo), thanks for the additional details, this is consistent with the root cause we found. A fix has been submitted in PR #1412
Fix base conda environment incorrectly resolved to a named environmen…
nahanoo commentedon Apr 2, 2026
Hi,
Thanks for your work and it was interesting to read about the source of the bug in your PR.
This PR should be already integrated in
code-insidersright?Because I wanted to test the fix and I installed
1.115.0-insider 54b695e02e47a37ded9ca68a32bb0d00d4560030and the bug remained.Happy to assist more.
Best,
UPDATE
I switched to the pre-release version of the python environments extension (
1.27.10911017) and the bug persists.Then I saw that the PR 1412 is not yet in
1.27is that correct?StellaHuang95 commentedon Apr 2, 2026
Hi Eric Ulrich (@nahanoo), yes this fix was made in the Python Environments extension. Could you try updating to the latest pre-release version (1.27.10921013) and see if the issue persists?
If it does, what you're experiencing might be a different issue from the one that was fixed. The linked PR specifically fixed a scenario where the base conda environment gets silently replaced by a named conda environment after reloading VS Code. For example:
If your scenario is different from the above, would you mind opening a new issue at https://github.com/microsoft/vscode-python-environments with concrete repro steps? That way we can take a closer look. Thanks!
nahanoo commentedon Apr 8, 2026
Thanks Stella Huang (@StellaHuang95)
I opened a new issue under microsoft/vscode-python-environments#1446.
See you over there hopefully:)
Taardisaa commentedon Apr 11, 2026
Hi,
I witnessed the same issue.
But then I uninstalled the "Python Environments" extension (version 1.26.0), and it can switch to conda base env successfully.
Maybe there's some bug in this "Python Environments" extension.