Skip to content

Environments from custom providers not listed in Python: Select Interpreter command palette #942

@symzn

Description

@symzn

Hi,

I've encountered an inconsistency in how the environments (provided by a third partextension that uses the python-envs API) are displayed within VS Code.

Steps to Reproduce:

  • Install the ms-python.vscode-python-envs extension.
  • Install an extension that registers a custom environment manager, such as the Micromamba Environment Provider.
  • Ensure some micromamba environments are discovered and visible in the Python Environments view.
  • Open the Command Palette (Ctrl+Shift+P).
  • Run the command Python: Select Interpreter.

Expected Behavior:

The list of interpreters shown in the command palette should include all environments discovered by the Python Environments extension, including those from custom providers like my Micromamba extension.

Actual Behavior:

The environments provided by the Micromamba Environment Provider are not listed in the command palette's Python: Select Interpreter list.
However, everything works as expected in other parts of the UI:

  • The environments are correctly listed in the Python Environments extension view in the sidebar.
  • The environments are also correctly listed and selectable when clicking the interpreter status bar item at the bottom-right of the window.

This suggests that the Python: Select Interpreter command is not correctly sourcing its list of environments from the same central discovery mechanism as the other UI components.

Related Issue with Notebook Kernels:

I believe there might be a related issue with Jupyter Notebooks. When trying to select a kernel for a notebook, the micromamba environments also seem to be missing from the kernel selection list. This reinforces the idea that some parts of VS Code are not fully connected to the new environments API.

It seems like there's a disconnect between the environment data provided via the new API and older command-palette-driven features.

Thank you for looking into this! Let me know if you need any more information from my side.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions