Skip to content

Ability to pre-filter Python interpreter list #17176

Closed

Description

Discussed in #16600

Originally posted by cdce8p July 2, 2021
With the pythonDeprecatePythonPath experiment the only way to change the interpreter is through the Select Interpreter command. Unfortunately this lists all available once (global, user, venv) which can get messy if multiple different Python versions are installed. For example, for one of my projects the list currently contains 17 entries which makes switching between them more complicated than it needs to be. I almost always only care only about the virtual environments, so there is no value for me to still list the system interpreters. I would love it if I could hide them.

Activity

  1. brettcannon commented on Sep 1, 2021

    @brettcannon
    MemberAuthor

    Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

  2. ewerybody commented on Sep 3, 2021

    @ewerybody

    I'd actually like to override the Python interpreter list in my workspace. Would that also work for you Marc Mueller (@cdce8p) ?
    And that'd be quite easy to implement, right?
    There could still be a Show more ... option.

    In my project we have multiple interpreters within the project space (Python2 and 3). So as these are neither installed globally or on user space I'm not expecting the extension to browse the whole project for interpreters and find them.
    I'd rather have it "remember" previously used interpreters even though they could not be found from interpreter search. I mean that's not impossible but "kinda magic" and I figured that I actually don't ever need the system interpreters in that particular project.

  3. cdce8p commented on Sep 3, 2021

    @cdce8p

    The recently changed sorting of the interpreter list is already a huge improvement. It's just that I still have quite a long list with 17 options when I only really use the virtual environments.

    My idea would be to hide the global installs (behind a Show more) if at least one venv is detected. I think that should work for most.

  4. brettcannon commented on Nov 1, 2021

    @brettcannon
    MemberAuthor

    Thank you for submitting your feature request and everyone who considered it! Unfortunately this issue did not receive enough votes over the allotted time, and so we are closing the issue.

  5. cdce8p commented on Nov 5, 2021

    @cdce8p

    The Jupyter extension just added something like this. Don't know, but maybe it's easy enough to repurpose here and worth considering again?

    From the changelog entry: https://code.visualstudio.com/updates/v1_62#_jupyter
    filter_kernels

  6. locked as resolved and limited conversation to collaborators on Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityneeds community feedbackAwaiting community feedback

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions