Jupyter kernel restart failure on Raspberry Pi 4

Hi, I am new to coding and while trying to install Jupyter on Raspberry Pi 4, I ran across the following error:
[I 20:00:50.170 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File “/usr/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/usr/lib/python3/dist-packages/ipykernel_launcher.py”, line 15, in
from ipykernel import kernelapp as app
File “/usr/lib/python3/dist-packages/ipykernel/init.py”, line 2, in
from .connect import *
File “/usr/lib/python3/dist-packages/ipykernel/connect.py”, line 13, in
from IPython.core.profiledir import ProfileDir
File “/usr/lib/python3/dist-packages/IPython/init.py”, line 49, in
from .terminal.embed import embed
File “/usr/lib/python3/dist-packages/IPython/terminal/embed.py”, line 18, in
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File “/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py”, line 20, in
from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output
ImportError: cannot import name ‘create_prompt_application’ from ‘prompt_toolkit.shortcuts’ (/home/pi/.local/lib/python3.7/site-packages/prompt_toolkit/shortcuts/init.py)
[W 20:00:53.205 NotebookApp] KernelRestarter: restart failed
[W 20:00:53.206 NotebookApp] Kernel bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4 died, removing from map.
[W 20:01:38.332 NotebookApp] Timeout waiting for kernel_info reply from bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4
[E 20:01:38.341 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4)
[W 20:01:39.497 NotebookApp] 404 GET /api/kernels/bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4/channels?session_id=496096ad877840bb8e2e6020a31a4330 (::1): Kernel does not exist: bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4
[W 20:01:39.564 NotebookApp] 404 GET /api/kernels/bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4/channels?session_id=496096ad877840bb8e2e6020a31a4330 (::1) 83.79ms referer=None
[W 20:01:41.636 NotebookApp] Replacing stale connection: bc2c7b9d-b5d5-46bc-a01d-5ae9cb336ce4:496096ad877840bb8e2e6020a31a4330

I would appreciate if someone can demystify this for me.
Thanks,
ND

1 Like