vscode-python: Base pyenv versions or virtual envs created using pyenv are missing on macOS

Environment data

  • VS Code version: 1.57.0-insider 37a12c9b0846167b2f68e9e1f276149d2d8b9b27
  • Extension version (available under the Extensions sidebar): v2021.5.829140558
  • OS and version: macOS 11.4
  • Python version (& distribution if applicable, e.g. Anaconda): pyenv
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): pyenv
  • Relevant/affected Python packages and their versions: all
  • Relevant/affected Python-related VS Code extensions and their versions: all
  • Value of the python.languageServer setting: Pylance

[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

Interpreter shows all pyenv base versions and virtual environments.

Actual behaviour

When I open the interpreter to select a Python version it shows all the virtual environment I have created in pyenv from the different base version, but not the base versions themselves. That is, I can select a virtual environment XXX based on 3.7.6 but not 3.7.6 itself.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 6
  • Comments: 26

Most upvoted comments

I’ll take this on in the next debt week 😃 expect ETA 2 months

I don’t think the python binary (or the link to it) shows up in the root of the pyenv version. I think it’s supposed to be inside bin/. It’s the same with the virtual environments that do show up for me in VSCode.

$ ls /Users/albireo/.pyenv/versions/archon/
total 4.0K
drwxr-xr-x 95 albireo staff 3.0K Aug 22 21:33 bin/
drwxr-xr-x  2 albireo staff   64 Apr  5 08:53 include/
drwxr-xr-x  3 albireo staff   96 Apr  5 08:53 lib/
-rw-r--r--  1 albireo staff  131 Apr  5 08:53 pyvenv.cfg
drwxr-xr-x  3 albireo staff   96 Apr  5 10:12 share/