Skip to content

Allow disabling of interpreter auto-selection #15975

Description

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

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 functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions