After start jupyter notebook, the terminal print out following lines
[I 18:35:02.331 NotebookApp] KernelRestarter: restarting kernel (2/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 <module>
from ipykernel import kernelapp as app
File "/usr/lib/python3/dist-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/usr/lib/python3/dist-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
File "/usr/lib/python3/dist-packages/IPython/__init__.py", line 49, in <module>
from .terminal.embed import embed
File "/usr/lib/python3/dist-packages/IPython/terminal/embed.py", line 18, in <module>
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 20, in <module>
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)

if I want use a notebook, it appears the message "Kernel starting please wait ..." in the header and I couldn't execute any python code in a notebook. I am really very desperate...
I ran into this today in one of my conda envs (probably older) and found that upgrading ipython resolved it. Please note that just prior to that, I also upgraded ipykernel, but when that didn't resolve it, I decided to try the ipython upgrade. Just wanted to share that in case the two steps combined are what is necessary.
If you could ONLY try the ipython upgrade, that would be helpful information. Hopefully just doing that (or the two steps) will be all you need.
@kevin-bates : My ipython and ipykernal is latest one i.e 7.12.0 and 5.1.4 and still getting same issue
Hmm. I'm not sure what to try next other than to move this issue to the ipykernel repo since its more related to it than notebook. Once there, someone may have a better idea of what's going on.
Most helpful comment
I ran into this today in one of my conda envs (probably older) and found that upgrading
ipythonresolved it. Please note that just prior to that, I also upgradedipykernel, but when that didn't resolve it, I decided to try theipythonupgrade. Just wanted to share that in case the two steps combined are what is necessary.If you could ONLY try the
ipythonupgrade, that would be helpful information. Hopefully just doing that (or the two steps) will be all you need.