Also a solution here:

conda install ipykernel --update-deps --force-reinstall
Answer from Evgeny on Stack Overflow
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 5689
"Kernel died with exit code 1" when trying to run code on interactive window · Issue #5689 · microsoft/vscode-jupyter
April 29, 2021 - bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from posternotebook-executionKernels issues (start/restart/switch/execution, install ipykernel)Kernels issues (start/restart/switch/execution, install ipykernel) ... Hi, I used to be able to run my python file using the interactive window. However, all of a sudden, I keep getting the following error "Kernel died with exit code 1" when I try to run my current file on the interactive window.
Author   malikdoole
Discussions

Kernel died with exit code 1.
Running cells within VSCode gives me an error: C:\Users\shebo\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is dep... More on github.com
🌐 github.com
2
August 6, 2021
kernel died with exit code 1. What does this mean?????????????????
Everytime I try to run a line of code in visual studio I get this: Kernel died with exit code 1. Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.... More on github.com
🌐 github.com
3
September 14, 2021
Kernel died with exit code 1. What does this mean????

Whenever you see an error with a big stack trace like this, the real problem tends to be at the bottom:

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\logging_init_.py", line 28, in <module>

from string import Template

ImportError: cannot import name 'Template' from 'string' (c:\Users\ryweb.vscode\string.py)

What it looks like to me is that from string import Template is intending to import a symbol from the standard string library that's part of your Python installation (which you installed in C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0). However, what it's finding instead is a file you wrote yourself -- c:\Users\ryweb\.vscode\string.py -- that doesn't provide Template.

In other words, by creating your own file named string.py, you have overridden and blocked access to the system's string library. Unless that's what you intended, you should probably name your file something else.

More on reddit.com
🌐 r/learnpython
1
2
September 14, 2021
'Kernel died with exit code 1' Error with Jupyter Notebook in VS Code - Stack Overflow
I am trying to run a Jupyter notebook in VS Code but I keep getting this error code: I have Python 3.8.8 which was installed using Anaconda. The project folder has a virtual environment created us... More on stackoverflow.com
🌐 stackoverflow.com
June 29, 2021
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 7182
Kernel died with exit 1 code : Out of disk space · Issue #7182 · microsoft/vscode-jupyter
August 18, 2021 - bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug ... Kernel died with exit code 1. /home/mingliang/anaconda3/envs/dgflowenv/lib/python3.7/site-packages/traitlets/traitlets.py:2199: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0.
Author   MLdoesML
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 6986
Kernel died with exit code 1. · Issue #6986 · microsoft/vscode-jupyter
August 6, 2021 - C:\Users\shebo\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( C:\Users\shebo\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '20e6f2d8-5191-45d6-8208-db97e47902eb' instead of 'b"20e6f2d8-5191-45d6-8208-db97e47902eb"'. warn( Traceback (most recent call last): File "C:\Users\shebo\miniconda3\envs\tor
Author   roboserg
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 5943
"Kernel died with exit code 1" fail in activating env (#5689 ) · Issue #5943 · microsoft/vscode-jupyter
Hmm, at this stage not sure what I can do. Please could you try installing pypiwin32 or uninstalling ipykernel & re-installing it. Basically your python environment doesn't seem to be setup propertly for Jupyter Kernels.
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 6716
Kernel died with exit code 1 when trying to run jupyter notebook in VS code · Issue #6716 · microsoft/vscode-jupyter
Got some issue after the recent update of VS code. Great thanks if you could give any hint. Environment data VS Code version: 1.58.2 Jupyter Extension version (available under the Extensions sideba...
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 7522
kernel died with exit code 1. What does this mean????????????????? · Issue #7522 · microsoft/vscode-jupyter
September 14, 2021 - bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster ... Kernel died with exit code 1.
Author   Fryguy7991
🌐
Reddit
reddit.com › r/learnpython › kernel died with exit code 1. what does this mean????
r/learnpython on Reddit: Kernel died with exit code 1. What does this mean????
September 14, 2021 -

So i'm trying to do python in visual studio code but whenever i run any code i get this:

Kernel died with exit code 1. Traceback (most recent call last):

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main

return _run_code(code, main_globals, None,

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code

exec(code, run_globals)

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel_launcher.py", line 15, in <module>

from ipykernel import kernelapp as app

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel\__init__.py", line 2, in <module>

from .connect import *

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel\connect.py", line 12, in <module>

import jupyter_client

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\jupyter_client\__init__.py", line 6, in <module>

from .asynchronous import AsyncKernelClient # noqa

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\jupyter_client\asynchronous\__init__.py", line 1, in <module>

from .client import AsyncKernelClient # noqa

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\jupyter_client\asynchronous\client.py", line 6, in <module>

from jupyter_client.channels import HBChannel

File "C:\Users\ryweb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\jupyter_client\channels.py", line 4, in <module>

import asyncio

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\asyncio\__init__.py", line 8, in <module>

from .base_events import *

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 18, in <module>

import concurrent.futures

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\concurrent\futures\__init__.py", line 8, in <module>

from concurrent.futures._base import (FIRST_COMPLETED,

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\concurrent\futures\_base.py", line 7, in <module>

import logging

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 28, in <module>

from string import Template

ImportError: cannot import name 'Template' from 'string' (c:\Users\ryweb\.vscode\string.py)

on top of that it says "connecting to python 3.9.7 64-bit(windows store)..." can someone help me please????????????????????

Find elsewhere
🌐
YouTube
youtube.com › watch
Fixing the Kernel died with exit code 1 Error in VS Code - YouTube
Learn how to resolve the `Kernel died with exit code 1` error when using Python in Visual Studio Code by following these easy steps.---This video is based on...
Published   April 15, 2025
Views   2
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 7444
Kernel died with exit code 1 · Issue #7444 · microsoft/vscode-jupyter
September 7, 2021 - Issue Type: Bug When using Shift+Enter to run import os from a python file, I get the error in the Jupyter Output logs shown below. The bug is that I am not trying to run anything from "o:\Notes\pythonEx\email.py", I don't even have that...
🌐
Stack Overflow
stackoverflow.com › questions › 68179334 › kernel-died-with-exit-code-1-error-with-jupyter-notebook-in-vs-code
'Kernel died with exit code 1' Error with Jupyter Notebook in VS Code - Stack Overflow
June 29, 2021 - I am trying to run a Jupyter notebook in VS Code but I keep getting this error code: I have Python 3.8.8 which was installed using Anaconda. The project folder has a virtual environment created us...
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 6795
Kernel Died with Exit Code 1073741845 · Issue #6795 · microsoft/vscode-jupyter
July 25, 2021 - The error message will appear as below. Kernel died with exit code 1073741845. D:\ProgramFiles\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
Author   yulu-duck
🌐
CSDN
devpress.csdn.net › python › 62fe023fc677032930804595.html
Kernel died with exit code 1(VS code)_python_Mangs-Python
August 18, 2022 - C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2195: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2150: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '8fe74386-11f1-4831-b37d-5582442edf8a' instead of 'b"8fe74386-11f1-4831-b37d-5582442edf8a"'. warn( Traceback (most recent call last): File "c:\Users\rohit.vscode\extensions\m
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 5963
Kernel died with exit code 1073741845. · Issue #5963 · microsoft/vscode-jupyter
May 23, 2021 - Kernel died with exit code 1073741845. #5963 ... bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugnotebook-executionKernels issues (start/restart/switch/execution, install ipykernel)Kernels issues (start/restart/switch/execution, install ipykernel)verifiedVerification succeededVerification succeeded ... When I tried to launch interactive window in vscode, it failed with the error below.
Published   May 23, 2021
Author   futurehome
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 7423
[Solved with solutions] Kernel Died with Exit Code 1073741845 · Issue #7423 · microsoft/vscode-jupyter
Detailed: Kernel died with exit code 1073741845. C:\anaconda\envs\env_test\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
🌐
Githubmemory
githubmemory.com › repo › microsoft › vscode-jupyter › issues › 6986
Kernel died with exit code 1. - githubmemory
September 14, 2021 - Kernel died with exit code 1. 2 closed · roboserg · roboserg NONE · Posted 2 years ago · bug · info-needed · Running cells within VSCode gives me an error: C:\Users\shebo\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0.
🌐
GitMemory
gitmemory.com › issue › microsoft › vscode-jupyter › 5689 › 829956320
"Kernel died with exit code 1" when trying to run code on interactive window - vscode-jupyter
May 1, 2021 - Unable to open Jupyter Notebooks: Using the Jupyter notebook editor requires the stable version of VS code and the CustomEditor experiment to be enabled.. hot 10 · Timed out waiting to get a heartbeat from kernel process.` When trying to open ipynb hot 6
🌐
DevDreamz
devdreamz.com › question › 281634-kernel-died-with-exit-code-1vs-code
Kernel died with exit code 1(VS code) - DevDreamz
1-Open Vs code choose your Kernal and Reinstall ipykenel · (Don't press anything keep reinstall till it works) Keep your kernal open while you doing this step by opening any notebook in the browser using Jupiter notebook normally And it will Work · or · Go to terminal open it as admin. conda activate base · conda install --name base ipykernel -y · refresh the kernel by opening the jupyter note book from vscode terminal ·