microsoft / microsoft/vscode-python-environments

Python Environments causes invalid "Python 3.14.undefined" kernels and Jupyter hangs on "Connecting to kernel"

未关闭
#1,795 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
138
派生
62
平均合并
1 天 4 小时
30 天内合并 PR
35

描述

## Description

After enabling the Python Environments extension, VS Code's Jupyter kernel picker detects kernels with names similar to:

> project-name (3.14.x) (Python 3.14.undefined)

When I select one of these kernels and run a notebook cell, the notebook remains stuck indefinitely at:

> Connecting to kernel...

Disabling the Python Environments extension and reloading VS Code resolves the issue. Jupyter notebooks then detect the expected kernels and run normally.

## Steps to reproduce

1. Install and enable the Python, Jupyter, and Python Environments extensions.
2. Open a `.ipynb` file in VS Code.
3. Open the kernel picker.
4. Observe a detected kernel named similar to `project-name (3.14.x) (Python 3.14.undefined)`.
5. Select that kernel.
6. Run any notebook cell.

## Actual behavior

- The detected kernel name contains `Python 3.14.undefined`.
- The notebook remains stuck at `Connecting to kernel...`.
- No cell is executed.

## Expected behavior

- Python environments should be detected with the correct Python version and kernel metadata.
- Selecting a valid environment should start the Jupyter kernel successfully.
- Invalid or incomplete kernel entries such as `Python 3.14.undefined` should not be shown.

## Workaround

Disable the Python Environments extension and reload VS Code. Kernel detection and notebook execution then work normally.

## Environment

- OS: Windows 11 25H2
- VS Code version: 1.138.0
- Python Environments extension version: 1.36.0
- Python extension version: 2026.4.0
- Jupyter extension version: 2025.9.1
- Python version: 3.14.7
- Environment type: uv
- Workspace type: local

## Additional information

The problem appears only while the Python Environments extension is enabled. Enabling or disabling that extension, without changing the notebook or Python environment, consistently reproduces or resolves the issue.

贡献指南

打开贡献指南

调研方向

首先,在启用 Python、Jupyter 和 Python Environments 扩展,并使用列出的 uv 环境设置的情况下,通过 VS Code 内核选择器复现该问题。跟踪 Python Environments 扩展如何报告内核元数据,以及选择器如何处理 `Python 3.14.undefined` 条目。完成的标准是:有效环境显示正确的版本,并且选定的内核能够连接并执行一个 notebook 单元格。

由索引模型根据 Issue 内容生成。

评估

技术栈
jupyter, python, typescript, vscode
领域
developer-experience, devtools, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

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