Skip to content

Interpreter discovery looking up in lib/ and share/ directories and finding pythonX.Y directories #15357

@brettcannon

Description

@brettcannon

Environment data

  • VS Code version: 1.54.0-insider
  • Extension version (available under the Extensions sidebar): v2021.2.549812789-rc
  • OS and version: WSL2 Debian
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • 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: Pylance

Expected behaviour

Not to list directories that happen to match the pythonX.Y format.

Actual behaviour

image

Notice the entries for:

  1. /etc
  2. /lib
  3. /usr/lib
  4. /usr/local/lib
  5. /usr/share

Steps to reproduce:

  1. Try to discover an environment

Logs

None

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions