Repository navigation
Increasingly duplicated conda / mamba / miniforge environments #22918
Copy link
Copy link
Closed
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Milestone
Description
Type: Bug
Behaviour
Expected vs. Actual
When selecting an interpreter, I expect conda environments (miniforge, in my case) to show only once. Instead, they are repeating two, three and now even five times.
Also, sometimes the python version will be displayed wrong (3.1.X).
mamba env list works well in terminal (both within and outside VSCode), so I supsect this is a Python app issue.
Steps to reproduce:
- Install mamba (miniforge, in my case) in a linux environment (fedora)
- Create some environments, either within or outside VSCode
- Close/reopen VSCode several times
The number of environments will start being repeated.
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.7
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
- Value of the
python.languageServersetting: Default
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
User Settings
languageServer: "Pylance"
Extension version: 2024.0.1
VS Code version: Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:07:19.849Z)
OS version: Linux x64 6.7.4-200.fc39.x86_64
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 13th Gen Intel(R) Core(TM) i7-13700H (20 x 2849) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 1, 1, 1 |
| Memory (System) | 15.25GB (7.02GB free) |
| Process Argv | --unity-launch --crash-reporter-id 1bcba3d5-9805-45ca-9f01-20f5eeb14cbc |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | gnome |
| XDG_CURRENT_DESKTOP | GNOME |
| XDG_SESSION_DESKTOP | gnome |
| XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
edj9j583:30958191
fegfb526:30961430
3ef8e399:30964150
bg6jg535:30958357
### Tasks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded

Activity
irm-codebase commentedon Feb 19, 2024
It seems like this is also affecting which environment is launched by the debugger, as it ignores my current configuration.
Regular terminal:

Launching the debugger:

karrtikr commentedon Feb 20, 2024
Hi, Mamba is currently not supported by the Python extension, feel free to upvote #20919 to raise priority, we hope to get to it soon. Closing it in favor of #20919.
irm-codebase commentedon Feb 20, 2024
Kartik Raj (@karrtikr) it sounds to me like that issue you mention is something else entirely.
Miniforge provides both conda AND mamba. The issue here is that conda environments are being duplicated, not that VSCode does not identify mamba at all.
Furthermore, you can clearly see in my diagnostics that conda is detected.
https://github.com/conda-forge/miniforge
karrtikr commentedon Feb 20, 2024
Ivan Ruiz Manuel (@irm-codebase) Gotcha, I figured it was mamba related based on "mamba env list" you mentioned.
If you find that a "conda" environment (listed via
conda env list) is being replicated, I'm happy to reopen and have a look again.karrtikr commentedon Feb 20, 2024
If that's the case please provide the debug logs which can help diagnose the issue:
Developer: Set log levelcommandTraceDeveloper: Reload WindowcommandOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)irm-codebase commentedon Feb 20, 2024
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)ueoo commentedon Feb 22, 2024
Same issue, some conda envs are duplicated in the Select Interpreter popup window.

karrtikr commentedon Feb 23, 2024
Gerry (@hologerry) , can you please also provide the debug logs asked earlier? #22918 (comment)
11 remaining items
karrtikr commentedon Feb 26, 2024
Fix should be out in the pre-release version of the extension, use the following to try it out:
irm-codebase commentedon Feb 26, 2024
Ran the instructions, and now the environments seem to be behaving!
Thank you for all the help Kartik Raj (@karrtikr) !
Fix duplicated environments in interpreter list (#22964)
Fix duplicated environments in interpreter list (microsoft/vscode-pyt…
Fix duplicated environments in interpreter list (microsoft/vscode-pyt…