The kernel base 'Python 3.9.7' died
See original GitHub issueApplies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
Expected: Implementing .pivot Actually: Getting a message saying “The kernel base ‘Python 3.9.7’ died”
I tried 2 ways; first using Python 3.8.9 64-bit, and second using base (Python 3.9.7). Both are giving similar issues and stops kernel.
VS Code Version
1.65.2 (Universal)
Jupyter Extension Version
2022.2.103 (7 March 2022)
Jupyter logs
Warn 14:23:05: StdErr from Kernel Process /Users/lucy/Library/Python/3.8/lib/python/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '7af8a52c-54c5-46a5-8090-47083d33bc35' instead of 'b"7af8a52c-54c5-46a5-8090-47083d33bc35"'.
warn(
Info 14:23:05: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
To connect another client to this kernel, use:
--existing /var/folders/bv/ll6j7g452_15zbvc974c7y7w0000gn/T/tmp-4138eLQjtKVIMba3.json
Info 14:23:06: Got new session ecd38373-69f2-4605-9d42-81cea567aa98
Info 14:23:06: Started new restart session
Info 14:23:06: Executing silently Code (idle) = import sys\nprint(sys.executable)
Info 14:23:06: Executing silently Code (completed) = import sys\nprint(sys.executable)
Info 14:23:06: Process Execution: > /usr/bin/python3 -c "import sys;print(sys.executable)"
> /usr/bin/python3 -c "import sys;print(sys.executable)"
Info 14:23:06: UpdateWorkingDirectoryAndPath in Kernel
Info 14:23:06: Executing silently Code (idle) = import site\nsite.addsitedir(site.getusersitepackages())\nimport os\nimport sys\n%cd "/Users/lucy/Deskto
Info 14:23:06: Executing silently Code (completed) = import site\nsite.addsitedir(site.getusersitepackages())\nimport os\nimport sys\n%cd "/Users/lucy/Deskto
Info 14:23:06: Waiting for idle on (kernel): ecd38373-69f2-4605-9d42-81cea567aa98 -> idle
Info 14:23:06: Finished waiting for idle on (kernel): ecd38373-69f2-4605-9d42-81cea567aa98 -> idle
Info 14:23:07: Cancel all remaining cells true || Error
Info 14:23:07: Cancel pending cells
Info 14:23:07: Cell 5 executed with state Error
Info 14:23:13: Execute Cells request 0
Info 14:23:13: Execute Cell 0 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:23:18: Cell 0 executed with state Success
Info 14:23:21: Execute Cells request 1
Info 14:23:21: Execute Cell 1 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:23:43: Cell 1 executed with state Success
Info 14:24:03: Execute Cells request 5
Info 14:24:03: Execute Cell 5 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Error 14:25:50: Disposing session as kernel process died ExitCode: undefined, Reason: /Users/lucy/Library/Python/3.8/lib/python/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
/Users/lucy/Library/Python/3.8/lib/python/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '7af8a52c-54c5-46a5-8090-47083d33bc35' instead of 'b"7af8a52c-54c5-46a5-8090-47083d33bc35"'.
warn(
Info 14:25:50: Dispose Kernel process
Error 14:25:50: Raw kernel process exited code: undefined
Info 14:25:50: Cancel all remaining cells due to dead kernel
Info 14:25:50: Cancel pending cells
Info 14:25:50: Cell 5 executed with state Success
Info 14:38:53: Disposing kernel .jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher for notebook ~/Desktop/Projects/MovieLens/recommendatiion.ipynb due to selection of another kernel or closing of the notebook
Info 14:38:53: Dispose kernel file:///Users/lucy/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:38:53: Setting setActiveController for ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:38:53: Interrupt requested & no kernel.
Info 14:38:53: KernelProvider switched kernel to id = .jvsc74a57bd01945a49d8267038c199a72e8f61b6bfcbb9f4626ddb3ddff4ec56a3f45e14a7a./Users/lucy/opt/anaconda3/python./Users/lucy/opt/anaconda3/python.-m#ipykernel_launcher
Info 14:38:53: Starting Notebook in kernel.ts id = .jvsc74a57bd01945a49d8267038c199a72e8f61b6bfcbb9f4626ddb3ddff4ec56a3f45e14a7a./Users/lucy/opt/anaconda3/python./Users/lucy/opt/anaconda3/python.-m#ipykernel_launcher
Info 14:38:53: Creating raw notebook for ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:38:53: Getting preferred kernel for ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:38:53: Computing working directory ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:38:53: Starting raw kernel base (Python 3.9.7) for interpreter ~/opt/anaconda3/bin/python
Info 14:38:53: installMissingDependencies ~/opt/anaconda3/bin/python
Info 14:38:53: IPyKernel found previously in this environment ~/opt/anaconda3/bin/python
Info 14:38:53: Kernel launching with ports 9000,9001,9002,9003,9004. Start port is 9000
Info 14:38:53: Process Execution: > ~/opt/anaconda3/bin/python -m pip list
> ~/opt/anaconda3/bin/python -m pip list
Info 14:38:53: Process Execution: > ~/opt/anaconda3/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~/opt/anaconda3/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
Info 14:38:53: Adding env Variable PYTHONNOUSERSITE to ~/opt/anaconda3/bin/python
Info 14:38:53: Process Execution: > ~/opt/anaconda3/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a9f0b4e1-5572-4d3b-a689-821b871a174f" --shell=9002 --transport="tcp" --iopub=9004 --f=/var/folders/bv/ll6j7g452_15zbvc974c7y7w0000gn/T/tmp-4138Nf5pqr22khJW.json
> ~/opt/anaconda3/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a9f0b4e1-5572-4d3b-a689-821b871a174f" --shell=9002 --transport="tcp" --iopub=9004 --f=/var/folders/bv/ll6j7g452_15zbvc974c7y7w0000gn/T/tmp-4138Nf5pqr22khJW.json
Info 14:38:53: Process Execution: cwd: ~/Desktop/Projects/MovieLens
cwd: ~/Desktop/Projects/MovieLens
Info 14:38:55: ipykernel version 6.4.1 for ~/opt/anaconda3/bin/python
Info 14:38:55: ipykernel location ~/opt/anaconda3/lib/python3.9/site-packages/ipykernel/__init__.py for ~/opt/anaconda3/bin/python
Info 14:38:56: Execute Cells request 0
Info 14:38:56: Execute Cell 0 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Warn 14:38:58: StdErr from Kernel Process /Users/lucy/opt/anaconda3/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
Warn 14:38:58: StdErr from Kernel Process /Users/lucy/opt/anaconda3/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a9f0b4e1-5572-4d3b-a689-821b871a174f' instead of 'b"a9f0b4e1-5572-4d3b-a689-821b871a174f"'.
warn(
Info 14:38:58: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
Info 14:38:58: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
To connect another client to this kernel, use:
--existing /var/folders/bv/ll6j7g452_15zbvc974c7y7w0000gn/T/tmp-4138Nf5pqr22khJW.json
Info 14:38:58: Raw session started and connected
Started kernel base (Python 3.9.7)
Info 14:38:58: Finished connecting acd3fbdf-245e-4e63-a192-82d4c2f16392
Info 14:38:58: Executing silently Code (idle) = import sys\nprint(sys.executable)
Info 14:38:59: Executing silently Code (completed) = import sys\nprint(sys.executable)
Info 14:38:59: UpdateWorkingDirectoryAndPath in Kernel
Info 14:38:59: Executing silently Code (idle) = import site\nsite.addsitedir(site.getusersitepackages())\nimport os\nimport sys\n%cd "/Users/lucy/Deskto
Info 14:38:59: Executing silently Code (completed) = import site\nsite.addsitedir(site.getusersitepackages())\nimport os\nimport sys\n%cd "/Users/lucy/Deskto
Info 14:38:59: Waiting for idle on (kernel): 37e4eb8a-4d4b-458f-bc31-fd703b990ed0 -> idle
Info 14:38:59: Finished waiting for idle on (kernel): 37e4eb8a-4d4b-458f-bc31-fd703b990ed0 -> idle
Info 14:39:06: Cell 0 executed with state Success
Info 14:39:08: Execute Cells request 1
Info 14:39:08: Execute Cell 1 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Info 14:39:31: Cell 1 executed with state Success
Info 14:39:38: Execute Cells request 5
Info 14:39:38: Execute Cell 5 ~/Desktop/Projects/MovieLens/recommendatiion.ipynb
Error 14:41:46: Disposing session as kernel process died ExitCode: undefined, Reason: /Users/lucy/opt/anaconda3/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
/Users/lucy/opt/anaconda3/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a9f0b4e1-5572-4d3b-a689-821b871a174f' instead of 'b"a9f0b4e1-5572-4d3b-a689-821b871a174f"'.
warn(
Info 14:41:46: Dispose Kernel process
Error 14:41:46: Raw kernel process exited code: undefined
Info 14:41:46: Cancel all remaining cells due to dead kernel
Info 14:41:46: Cancel pending cells
Info 14:41:46: Cell 5 executed with state Success
Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
conda version : 4.11.0, conda-build version : 3.21.5
Running Jupyter locally or remotely?
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Kernel died with exit code 1(VS code) - python - Stack Overflow
Go to terminal open it as admin. conda activate base; conda install --name base ipykernel -y; refresh the kernel by opening the jupyter...
Read more >The kernel appears to have died. It will restart ... - YouTube
Apologies for the audio distortion in the beginning of the video: I am a robot.In this video, I'll show you how to fix...
Read more >Kernel died with exit code 1. What does this mean???? - Reddit
So i'm trying to do python in visual studio code but whenever i run any code i get this: Kernel died with exit...
Read more >The kernel appears to have died. It will restart automatically
Hi, I got the message “The kernel appears to have died. It will restart automatically.” every time when I ran from fastbook import...
Read more >importing tensorflow kills kernel - You.com | The AI Search ...
Python kernel dies when importing tensorflow 1.7 ... TensorFlow installed from (source or binary):; TensorFlow version: 2.4, 2.5, 2.6; Python version: 3.9.7 ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. I get this on the pivot call.
Meaning I don’t think you can perform a pivot on that dataset. It’s too big. I may not have gotten a crash because I’m using 64 bit.
Sounds like this bug here: https://github.com/pandas-dev/pandas/issues/10582
I’d recommend running on a 64 bit machine if you’re not already, and installing 64 bit python. Or trimming the CSV down before trying to pivot.
Oh sure. Yes, it’s public, and I got the file from [ml-25m.zip] on https://grouplens.org/datasets/movielens/