Skip to content

Duplicate environments after fixing python #19384

@rzhao271

Description

@rzhao271

Issue Type: Bug

Behaviour

Expected vs. Actual

Expected: the snowflakes environment doesn't show up twice
Actual: the snowflakes environment shows up twice

Steps to reproduce:

  1. On Windows, create a new conda environment called snowflakes
  2. Rename the python file within that environment to make the extension not be able to find the interpreter
  3. Reload the window and reactivate the extension. Confirm that a warning icon shows up next to the snowflakes environment
  4. Rename the python file back to python.exe
  5. Reload the window and reactivate the extension. Two snowflake environments show up in the interpreter picker

Screenshots

Screenshot showing there are two options named snowflakes in the interpreter picker instead of one

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

L’expérience «All» est active
LSP Notebooks experiment is disabled -- not in treatment group
> ~\Miniconda3 info --json
> conda info --json
> ~\AppData\Local\Programs\Python\Python39\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> C:\msys64\mingw64\bin\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\.pyenv\pyenv-win\versions\2.7.16\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\.pyenv\pyenv-win\versions\3.8.10\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\.pyenv\pyenv-win\versions\3.9.4\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> .\.venv1\Scripts\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.7.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\Miniconda3\Scripts\conda.exe info --json
> ~\Miniconda3\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\PythonCodingPack\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python38\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
> ~\Miniconda3\condabin\conda.bat info --json
> ~\Miniconda3\envs\snowflakes\python.exe ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\interpreterInfo.py
Chemin de l’interpréteur Python : ~\Miniconda3\envs\snowflakes\python.exe
> ~\Miniconda3\Scripts\conda.exe run -n snowflakes --no-capture-output python ~\.vscode-insiders\extensions\ms-python.python-2022.9.11791004\pythonFiles\get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.9.11791004/pythonFiles/printEnvVariables.py
Démarrage du serveur de langage Pylance

User Settings


condaPath: "<placeholder>"

languageServer: "Pylance"

formatting
• provider: "black"

experiments
• optInto: ["All"]

Extension version: 2022.9.11791004
VS Code version: Code - Insiders 1.69.0-insider (0e3304b, 2022-06-29T05:20:28.364Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) undefined
Memory (System) 31.59GB (16.04GB free)
Process Argv --log trace --crash-reporter-id 504c9256-58c2-451f-8cc0-983584dae98d
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions