Description
I am experiencing a reproducible Jupyter kernel crash in VS Code when using a Python environment managed by Pixi on Windows.
The exact same Pixi environment and the exact same Matplotlib code work correctly when:
- Running Python directly through Pixi from a terminal.
- Running Jupyter Notebook from the Pixi environment in a web browser.
- Using the same Pixi interpreter as a VS Code Jupyter kernel with the
Python Environments extension disabled.
The crash occurs when Python Environments is enabled.
Disabling ms-python.vscode-python-envs also disables Pixi Code, since Pixi Code depends on Python Environments. After both extensions are disabled, I can manually select the Pixi python.exe as the interpreter and Jupyter kernel, and the exact same code runs correctly.
This makes me suspect an interaction between ms-python.vscode-python-envs, the Python extension, Jupyter, and Pixi environment activation.
Environment
Operating system
Windows 11, x64.
VS Code
- Version: 1.133.0 (User Setup)
- Commit: a5b500951314efd502d07465bd138dfbd714a960
- Date: 2026-08-11T22:14:08Z
- Electron: 42.8.0
- Chromium: 148.0.7778.280
- Node.js: 24.18.0
- V8: 14.8.178.38-electron.0
Pixi
- Pixi version: 0.67.0
- Platform: win-64
- Channel: conda-forge
- Environment:
default
The environment is located at:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default
Python
Python packages
- numpy: 2.2.6
- pandas: 2.2.3
- matplotlib: 3.9.4
- ipykernel: 6.31.0
Relevant VS Code extensions
- Python:
ms-python.python@2026.4.0
- Python Environments:
ms-python.vscode-python-envs@1.36.0
- Jupyter:
ms-toolsai.jupyter@2025.9.1
- Jupyter Notebook Renderers:
ms-toolsai.jupyter-renderers@1.3.0
- Pixi Code:
renan-r-santos.pixi-code@0.2.0
- Pylance:
ms-python.vscode-pylance@2026.3.1
- Python Debugger:
ms-python.debugpy@2026.6.0
Minimal reproduction
The following code is sufficient to reproduce the kernel crash:
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(10)
y = x**2
fig, ax = plt.subplots()
ax.scatter(x, y)
plt.show()
The problem also occurs when using a Python file with VS Code's # %% interactive cells.
Steps to reproduce
-
Create/open a Pixi project on Windows.
-
Install Python, NumPy, Matplotlib and IPython kernel.
-
Open the project in VS Code.
-
Enable Python Environments.
-
Select the Pixi interpreter:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe
-
Select the same interpreter as the Jupyter kernel.
-
Run the minimal example above.
-
The kernel crashes.
Actual behavior
The following logs were captured from the same reproduction.
Jupyter output
14:29:11.771 [info] Starting interactive window for resource 'c:\BackUp\Project\11. Cruces de Emas\proyecto_11\Vamos a ver.py' with controller '.jvsc74a57bd0d61f5b99e904adbc10bd8d84ee2f59ba23b03f67c32ecc2c7ac4a21ea9a28656.c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe.c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe.-m#ipykernel_launcher (Interactive)'
14:29:11.977 [info] Starting Kernel (Python Path: c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe, Unknown, 3.12.13) for 'Interactive-1.interactive' (disableUI=false)
14:29:41.907 [warn] Failed to get activated env vars for c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe in 30026ms
14:29:41.913 [info] Process Execution: c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe -m pip list
14:29:41.995 [info] Process Execution: c:\BackUp\Project\11\ Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe -c "import pip;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
14:29:42.055 [warn] Failed to get activated env vars for c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe in 30067ms
14:29:42.060 [info] Process Execution: c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
14:29:42.095 [info] Process Execution: c:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe -m ipykernel_launcher --f=~\AppData\Roaming\jupyter\runtime\kernel-v38c41a242ed3053ecd7f0ad2212f3dcc6ceb92f96.json
> cwd: c:\BackUp\Project\11. Cruces de Emas\proyecto_11
14:29:43.630 [info] Kernel successfully started
14:29:43.701 [info] Generated code for 1 = <ipython-input-1-3459f81c5a55> with 12 lines
14:29:44.441 [error] Disposing session as kernel process died ExitCode: 3228369023, Reason:
14:29:44.457 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
Python output
The Python extension attempts to obtain the activated environment variables by executing pixi shell twice:
2026-08-14 14:29:11.897 [info] > ~\AppData\Local\pixi\bin\pixi.EXE shell --manifest-path "C:\BackUp\Project\11. Cruces de Emas\proyecto_11\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py
2026-08-14 14:29:11.897 [info] shell: commandPrompt
2026-08-14 14:29:11.993 [info] > ~\AppData\Local\pixi\bin\pixi.EXE shell --manifest-path "C:\BackUp\Project\11. Cruces de Emas\proyecto_11\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py
2026-08-14 14:29:11.993 [info] shell: commandPrompt
2026-08-14 14:29:41.906 [error] getActivatedEnvironmentVariables [Error: Command failed: C:\Users\franc\AppData\Local\pixi\bin\pixi.EXE shell --manifest-path "C:\BackUp\Project\11. Cruces de Emas\proyecto_11\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/franc/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py
at genericNodeError (node:internal/errors:985:15)
at wrappedFn (node:internal/errors:539:14)
at ChildProcess.exithandler (node:child_process:418:12)
at ChildProcess.emit (node:events:521:24)
at maybeClose (node:internal/child_process:1124:16)
at ChildProcess._handle.onexit (node:internal/child_process:1124:16)] {
code: null,
killed: true,
signal: 'SIGTERM',
cmd: `C:\\Users\\franc\\AppData\\Local\\pixi\\bin\\pixi.EXE shell --manifest-path "C:\\BackUp\\Project\\11. Cruces de Emas\\proyecto_11\\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/franc/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py`
}
2026-08-14 14:29:42.054 [error] getActivatedEnvironmentVariables [Error: Command failed: C:\Users\franc\AppData\Local\pixi\bin\pixi.EXE shell --manifest-path "C:\BackUp\Project\11. Cruces de Emas\proyecto_11\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/franc/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py
at genericNodeError (node:internal/errors:985:15)
at wrappedFn (node:internal/errors:539:24)
at ChildProcess.exithandler (node:internal/child_process:418:12)
at ChildProcess.emit (node:events:521:16)
at maybeClose (node:internal/child_process:1124:16)] {
code: null,
killed: true,
signal: 'SIGTERM',
cmd: `C:\\Users\\franc\\AppData\\Local\\pixi\\bin\\pixi.EXE shell --manifest-path "C:\\BackUp\\Project\\11. Cruces de Emas\\proyecto_11\\pixi.toml" && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/franc/.vscode/extensions/ms-python.python-2026.4.0-win32-x64/python_files/printEnvVariables.py`
}
The pixi shell command is therefore terminated with SIGTERM after approximately 30 seconds on both attempts.
Python Environments output
2026-08-14 14:29:12.166 [info] [SYS_GET] uri=\Interactive-1.interactive, normalizedKey=/interactive-1.interactive, project=none, projectKey=none, mapKeys=[c:/backup/project/11. cruces de emas], directHit=false, projectHit=false, fallbackToGlobal=true, globalEnv=none
2026-08-14 14:30:20.036 [info] [SYS_GET] uri=c:\BackUp\Project\11. Cruces de Emas\proyecto_11\Vamos a ver.py, normalizedKey=c:/backup/project/11. cruces de emas/proyecto_11/vamos a ver.py, project=c:\BackUp\Project\11. Cruces de Emas, projectKey=c:/backup/project/11. cruces de emas, mapKeys=[c:/backup/project/11. cruces de emas], directHit=false, projectHit=true, fallbackToGlobal=false, globalEnv=none
2026-08-14 14:30:31.797 [info] [SYS_GET] uri=c:\BackUp\Project\11. Cruces de Emas\proyecto_11\Vamos a ver.py, normalizedKey=c:/backup/project/11. cruces de emas/proyecto_11/vamos a ver.py, project=c:\BackUp\Project\11. Cruces de Emas, projectKey=c:/backup/project/11. cruces de emas, mapKeys=[c:/backup/project/11. cruces de emas], directHit=false, projectHit=true, fallbackToGlobal=false, globalEnv=none
Important timing observation
The logs from the same execution show the following sequence:
- VS Code starts the interactive window at
14:29:11.
- The Python extension invokes
pixi shell.
- The first
pixi shell attempt is terminated with SIGTERM after approximately 30 seconds.
- Jupyter reports
Failed to get activated env vars.
- A second
pixi shell attempt is made.
- The second attempt is also terminated with
SIGTERM.
- Jupyter starts the kernel successfully at
14:29:43.
- The cell executes at
14:29:43.
- Approximately 0.7 seconds later, the kernel dies with
ExitCode: 3228369023.
- Jupyter then reports a failure to access
https://unpkg.com/.
Control tests
I performed several tests to determine whether the problem was caused by Python, Pixi, Jupyter, Matplotlib, or the amount of data.
1. Pixi + Python + Matplotlib outside VS Code
The following command works correctly:
pixi run python -c "import matplotlib.pyplot as plt; import numpy as np; x=np.arange(10); y=x**2; fig,ax=plt.subplots(); ax.scatter(x,y); plt.show(); print('OK')"
The plot is displayed and the Python process does not crash.
2. Pixi + Jupyter Notebook outside VS Code
I installed Jupyter Notebook in the same Pixi environment and launched it with:
pixi run jupyter notebook
The same quadratic scatter plot works correctly in the browser-based Jupyter Notebook interface.
3. VS Code + Python Environments enabled
The exact same code crashes the Jupyter kernel.
4. VS Code + Python Environments disabled
I disabled:
ms-python.vscode-python-envs
This also disables:
renan-r-santos.pixi-code
because Pixi Code depends on Python Environments.
I then manually selected the exact same Pixi interpreter:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exe
and selected it as the Jupyter kernel.
The exact same code then works correctly in VS Code.
This is currently a reliable workaround.
Version testing
I initially suspected Python 3.14 or recent package versions.
The environment was therefore changed from Python 3.14 to Python 3.12 and the packages were also changed to more conservative versions.
The issue still reproduces with:
- Python 3.12.13
- NumPy 2.2.6
- Pandas 2.2.3
- Matplotlib 3.9.4
- IPython kernel 6.31.0
Therefore, the problem does not appear to be specific to Python 3.14 or the latest NumPy/Matplotlib versions.
The issue also reproduces with only 10 points in a minimal scatter plot, so it is not related to the amount of data.
Additional observation
Jupyter reports the following immediately after the cell is executed and just after the kernel dies:
Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
I do not know whether this is related to the kernel crash, so I am including it as additional diagnostic information.
Related issues
This appears related to:
My case appears to be more severe: the environment activation attempts take approximately 30 seconds, are terminated with SIGTERM, and the Jupyter kernel subsequently dies with ExitCode: 3228369023.
Workaround
The current workaround is:
- Disable
ms-python.vscode-python-envs.
- This also disables
renan-r-santos.pixi-code.
- Manually select the Pixi
python.exe.
- Select the same interpreter as the Jupyter kernel.
After doing this, the same Jupyter code works correctly in VS Code.
Request
Could you investigate the interaction between ms-python.vscode-python-envs, the Python extension, Jupyter, and Pixi environments on Windows?
In particular, the following sequence seems suspicious:
- The Python extension invokes
pixi shell --manifest-path ....
- The command does not complete within approximately 30 seconds.
- The process is terminated with
SIGTERM.
- The Python extension retries the same operation.
- The second attempt is also terminated with
SIGTERM.
- Jupyter subsequently starts the kernel successfully.
- The kernel dies shortly after executing the cell with
ExitCode: 3228369023.
Could you also clarify whether the Widget Error: Failed to access CDN https://unpkg.com/ message could be related to the kernel termination?
This issue report was written entirely with the assistance of OpenAI's GPT-5.6 Luna. The technical observations, tests, logs, versions, and reproduction steps are my own.
Description
I am experiencing a reproducible Jupyter kernel crash in VS Code when using a Python environment managed by Pixi on Windows.
The exact same Pixi environment and the exact same Matplotlib code work correctly when:
Python Environmentsextension disabled.The crash occurs when
Python Environmentsis enabled.Disabling
ms-python.vscode-python-envsalso disablesPixi Code, since Pixi Code depends on Python Environments. After both extensions are disabled, I can manually select the Pixipython.exeas the interpreter and Jupyter kernel, and the exact same code runs correctly.This makes me suspect an interaction between
ms-python.vscode-python-envs, the Python extension, Jupyter, and Pixi environment activation.Environment
Operating system
Windows 11, x64.
VS Code
Pixi
defaultThe environment is located at:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\defaultPython
Python packages
Relevant VS Code extensions
ms-python.python@2026.4.0ms-python.vscode-python-envs@1.36.0ms-toolsai.jupyter@2025.9.1ms-toolsai.jupyter-renderers@1.3.0renan-r-santos.pixi-code@0.2.0ms-python.vscode-pylance@2026.3.1ms-python.debugpy@2026.6.0Minimal reproduction
The following code is sufficient to reproduce the kernel crash:
The problem also occurs when using a Python file with VS Code's
# %%interactive cells.Steps to reproduce
Create/open a Pixi project on Windows.
Install Python, NumPy, Matplotlib and IPython kernel.
Open the project in VS Code.
Enable
Python Environments.Select the Pixi interpreter:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exeSelect the same interpreter as the Jupyter kernel.
Run the minimal example above.
The kernel crashes.
Actual behavior
The following logs were captured from the same reproduction.
Jupyter output
Python output
The Python extension attempts to obtain the activated environment variables by executing
pixi shelltwice:The
pixi shellcommand is therefore terminated withSIGTERMafter approximately 30 seconds on both attempts.Python Environments output
Important timing observation
The logs from the same execution show the following sequence:
14:29:11.pixi shell.pixi shellattempt is terminated withSIGTERMafter approximately 30 seconds.Failed to get activated env vars.pixi shellattempt is made.SIGTERM.14:29:43.14:29:43.ExitCode: 3228369023.https://unpkg.com/.Control tests
I performed several tests to determine whether the problem was caused by Python, Pixi, Jupyter, Matplotlib, or the amount of data.
1. Pixi + Python + Matplotlib outside VS Code
The following command works correctly:
pixi run python -c "import matplotlib.pyplot as plt; import numpy as np; x=np.arange(10); y=x**2; fig,ax=plt.subplots(); ax.scatter(x,y); plt.show(); print('OK')"The plot is displayed and the Python process does not crash.
2. Pixi + Jupyter Notebook outside VS Code
I installed Jupyter Notebook in the same Pixi environment and launched it with:
The same quadratic scatter plot works correctly in the browser-based Jupyter Notebook interface.
3. VS Code + Python Environments enabled
The exact same code crashes the Jupyter kernel.
4. VS Code + Python Environments disabled
I disabled:
ms-python.vscode-python-envsThis also disables:
renan-r-santos.pixi-codebecause Pixi Code depends on Python Environments.
I then manually selected the exact same Pixi interpreter:
C:\BackUp\Project\11. Cruces de Emas\proyecto_11\.pixi\envs\default\python.exeand selected it as the Jupyter kernel.
The exact same code then works correctly in VS Code.
This is currently a reliable workaround.
Version testing
I initially suspected Python 3.14 or recent package versions.
The environment was therefore changed from Python 3.14 to Python 3.12 and the packages were also changed to more conservative versions.
The issue still reproduces with:
Therefore, the problem does not appear to be specific to Python 3.14 or the latest NumPy/Matplotlib versions.
The issue also reproduces with only 10 points in a minimal scatter plot, so it is not related to the amount of data.
Additional observation
Jupyter reports the following immediately after the cell is executed and just after the kernel dies:
I do not know whether this is related to the kernel crash, so I am including it as additional diagnostic information.
Related issues
This appears related to:
Kernel crashes when trying to plot matplotlib figure vscode-jupyter#17142 — "Kernel crashes when trying to plot matplotlib figure"
Kernel crashes when trying to plot matplotlib figure vscode-jupyter#17142
This issue also reports Windows + Pixi + Jupyter and
ExitCode: 3228369023, together withFailed to get activated env vars.Jupyter kernel startup delayed 30s when extension is installed (pixi environment) #1407 — "Jupyter kernel startup delayed 30s when extension is installed (pixi environment)"
Jupyter kernel startup delayed 30s when extension is installed (pixi environment) #1407
This issue reports a Pixi + Jupyter problem associated with
ms-python.vscode-python-envs, includingFailed to get activated env vars.My case appears to be more severe: the environment activation attempts take approximately 30 seconds, are terminated with
SIGTERM, and the Jupyter kernel subsequently dies withExitCode: 3228369023.Workaround
The current workaround is:
ms-python.vscode-python-envs.renan-r-santos.pixi-code.python.exe.After doing this, the same Jupyter code works correctly in VS Code.
Request
Could you investigate the interaction between
ms-python.vscode-python-envs, the Python extension, Jupyter, and Pixi environments on Windows?In particular, the following sequence seems suspicious:
pixi shell --manifest-path ....SIGTERM.SIGTERM.ExitCode: 3228369023.Could you also clarify whether the
Widget Error: Failed to access CDN https://unpkg.com/message could be related to the kernel termination?This issue report was written entirely with the assistance of OpenAI's GPT-5.6 Luna. The technical observations, tests, logs, versions, and reproduction steps are my own.