Skip to content

GetInterpreterList does not pick up newly added virtual environments (when called from Jupyter) #17492

@rchiodo

Description

@rchiodo

Environment data

  • VS Code version: Insiders latest
  • Extension version 2021.10.1258668113-dev
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): XXX
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: XXX

[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]

Expected behaviour

Virtual environments just created will end up in list of kernels.

Actual behaviour

Virtual environments do not appear as kernels

Steps to reproduce:

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

  1. Create virtual env outside of vs code
  2. Open VS code in same root folder
  3. Open notebook
  4. New venv is not selectable as a kernel.
  5. Open python file
  6. New venv is selectable as a python interpreter.

This test run is failing for the same reason:
https://github.com/microsoft/vscode-jupyter/runs/3669744903?check_suite_focus=true

Logs

Here's the logs from jupyter. Notice how the venv 'testDummyVenv' is not listed.
jupyterlog.txt

Here's the logs from python. venv 'testDummyVenv' is listed.
pythonlog.txt

We (Jupyter) are not getting the new venv when calling getInterpreterList. This seems like a recent regression.

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions