Skip to content

Allow disabling of interpreter auto-selection #17228

Closed

Description

Discussed in #16153

Originally posted by AaronNBrock April 16, 2021

Environment data

  • VS Code version: 1.55.2
  • Extension version (available under the Extensions sidebar): v2021.3.680753044
  • OS and version: Windows 10, using WSL 2
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9 (but should be irrelevant to this issue)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Not Set

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Background

Nowhere in my vscode settings (user, remote, or workspace) do I define a python.pythonPath (nor python.defaultInterpreterPath), the setting is completely empty:

Code_6T961dElFB

Expected behaviour

Newly created projects should have no interpreter & vscode should show Select Python Interpreter on the statusbar
no-interpreter-selected-statusbar

Actual behaviour

Newly created projects select my conda project auth0-python-web-app (an environment from a unrelated project).

Code_4LZ3DYt8zJ

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

This is for me to reproduce

  1. Create a new directory
  2. File > Open Folder... > Select newly created folder
  3. Create a *.py
  4. VSCode selects my auth0-python-web-app environment

Other notes

  • Restarting VS code doesn't resolve this
  • If I delete the selected conda environment (in this case auth0-python-web-app), vscode will start autoselecting a different conda environment. I can't figure out how it determines which one it selects.

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. luabud commented on Sep 2, 2021

    @luabud
    Member

    Aaron N. Brock ☂️ (@AaronNBrock) I believe the mis-selection has been fixed in the latest version of the Python extension, would you mind verifying?

  3. AutomateAaron commented on Oct 7, 2021

    @AutomateAaron

    I'm a little late, but just checked today & yes it does seem to be fixed. Happy to have this issue closed.

  4. luabud commented on Oct 8, 2021

    @luabud
    Member

    Thank you so much!

  5. locked as resolved and limited conversation to collaborators on Nov 30, 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