Fresh Jupyter Install fails on notebook launch - "ImportError: cannot import name 'create_prompt_application' from 'prompt_toolkit.shortcuts'

I just installed Jupiter (v 4.4.0) on Ubuntu 18.04. Python version is 3.7. When I try to run any code, I get the same error message. My kernel output looks like this.

I 01:09:32.973 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 "/home/daniel/.local/lib/python3.7/site-packages/ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "/home/daniel/.local/lib/python3.7/site-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/home/daniel/.local/lib/python3.7/site-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/daniel/.local/lib/python3.7/site-packages/prompt_toolkit/shortcuts/__init__.py)

I tried downgrading the version of prompt-toolkit to 2.0.1 because the latest version of prompt-toolkit seems to be incompatible with IPython. Downgrading to 1.0.4 didn't help either.


Solved by downgrading prompt-toolkit to 1.0.15.