Skip to content

Pixi environment: 30s Jupyter kernel startup delay due to Failed to get activated env vars timeout #25804

@hadim

Description

@hadim

Bug Report

Environment

  • OS: macOS arm64 (Apple Silicon)
  • VS Code: latest stable
  • ms-python.python: 2026.2.0
  • ms-python.vscode-python-envs: 1.17.x
  • ms-toolsai.jupyter: 2025.10.x
  • Pixi: 0.63.1
  • Python: 3.12.12 (managed by Pixi)
  • ipykernel: 7.2.0

Description

Since updating ms-python.python to 2026.2.0 (with ms-python.vscode-python-envs also installed), every Jupyter kernel startup is delayed by exactly 30 seconds. The extension attempts to collect activated environment variables for the Pixi environment but times out because Pixi environments are not recognized (detected as Unknown).

The kernel does eventually start and works correctly, but the 30-second delay on every kernel start/restart makes the development experience very frustrating.

This was not an issue with previous versions of ms-python.python (2026.1.x and earlier).

Logs

15:53:54.422 [info] Starting Kernel (Python Path: ~/.pixi/envs/default/bin/python, Unknown, 3.12.12) for 'notebooks/Embedding.ipynb' (disableUI=true)
15:54:24.611 [warn] Failed to get activated env vars for ~/.pixi/envs/default/bin/python in 30011ms
15:54:24.613 [warn] Failed to get activated env vars for ~/.pixi/envs/default/bin/python in 30011ms
15:54:24.613 [info] Process Execution: ~/.pixi/envs/default/bin/python -c "import ipykernel; ..."
15:54:24.613 [info] Process Execution: ~/.pixi/envs/default/bin/python -m ipykernel_launcher --f=...
15:54:25.053 [info] Kernel successfully started

Note the exact 30-second gap between Starting Kernel and Kernel successfully started, caused by the Failed to get activated env vars timeout. The environment type is reported as Unknown — Pixi is not recognized as a known environment type.

Running pixi shell in a terminal is near-instant, so the issue is not with Pixi itself but with how the extension attempts to activate the environment.

Steps to Reproduce

  1. Have a Pixi project with ipykernel as a dependency
  2. Have ms-python.python 2026.2.0 and ms-python.vscode-python-envs installed
  3. Open a Jupyter notebook in VS Code
  4. Select the Pixi environment interpreter (.pixi/envs/default/bin/python)
  5. Start or restart the kernel
  6. Observe the 30-second delay before the kernel is ready

Workaround

Downgrading ms-python.python to a version prior to 2026.2.0 and uninstalling ms-python.vscode-python-envs immediately resolves the issue — kernel startup becomes instant again.

Expected Behavior

Pixi environments should either be recognized and activated properly, or the activation attempt should fail fast instead of blocking for 30 seconds.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions