microsoft / microsoft/vscode-python-environments

VS Code discovers Conda environments but Python: Select Interpreter does not display them

未关闭
#1,671 8 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@StellaHuang95 已经在做这个了。

开始于 2026年8月5日。

bug triage-needed
主要语言
TypeScript
星标
138
派生
62
平均合并
1 天 4 小时
30 天内合并 PR
35

描述

Does this issue occur when all extensions are disabled?: N/A, need python extension to get it to work

VS Code discovers Conda environments but Python: Select Interpreter does not display them

Environment

  • VS Code: 1.130.0
  • OS: macOS (Apple Silicon)
  • Conda: 26.3.2
  • Python Environments extension: 1.36.0
  • Python extension: current release at time of filing
  • Pylance: current release at time of filing

Problem

VS Code no longer displays my Conda environments in the interpreter picker.

When I run Python: Select Interpreter, I only see:

  • System Python
  • Any interpreter that was manually selected previously
  • Enter Interpreter Path
  • Create Virtual Environment

My Conda environments are not listed.

However, manually selecting an interpreter by path works correctly.

For example, if I manually select:

<conda-install>/envs/<env-name>/bin/python

the environment works normally afterward.

The issue is specifically that discovered Conda environments are not shown in the interpreter picker.

Steps to Reproduce

  1. Install Miniforge/Conda and create one or more Conda environments.
  2. Verify that the environments exist:
conda env list
  1. Open VS Code.
  2. Install and enable:
    • Python
    • Python Environments
    • Pylance
  3. Open a workspace/folder.
  4. Run:
Python: Select Interpreter

Expected Behavior

All discovered Conda environments should appear in the interpreter picker.

For example:

base
<env-1>
<env-2>
...

Actual Behavior

The interpreter picker only displays:

System Python
Enter Interpreter Path
Create Virtual Environment

along with any interpreters that were manually selected previously.

Discovered Conda environments are not shown.

Evidence From Logs

The Python Environments extension reports that Conda environments are being discovered successfully:

Environment discovery complete: 9 environments found (Global: 1, Conda: 8)

Example log entries:

Using conda from persistent state: <conda-install>/bin/conda

Found named environment: <env-1>
Found named environment: <env-2>
Found named environment: <env-3>

Discovered env:
<conda-install>/envs/<env-1>/bin/python

Discovered env:
<conda-install>/envs/<env-2>/bin/python

Discovered env:
<conda-install>/envs/<env-3>/bin/python

The logs indicate that environment discovery is functioning correctly, but the discovered environments are not displayed in the interpreter picker UI.

Troubleshooting Already Attempted

Verified Conda is functioning correctly:

conda env list

returns all expected environments.

Verified Conda executable is present:

which -a conda
conda info --base

Both return expected results.

Verified the integrated VS Code terminal can use Conda normally.

Verified that manually selecting an interpreter path works and the selected environment functions correctly.

Executed:

Python: Clear Workspace Interpreter Setting

and then:

Developer: Reload Window

Deleted the Python Environments extension cache:

~/Library/Application Support/Code/User/globalStorage/ms-python.vscode-python-envs

Deleted VS Code workspace storage:

~/Library/Application Support/Code/User/workspaceStorage

Restarted VS Code.

Reinstalled VS Code completely.

Issue persists.

Additional Notes

The problem appeared suddenly after previously working correctly.

The integrated terminal is able to use Conda normally, and the Python Environments extension consistently reports successful Conda environment discovery.

This appears to be an issue where discovered Conda environments are not being surfaced in the interpreter picker UI despite being successfully discovered by the Python Environments extension.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。