{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter/notebook/issues/4050","repository_url":"https://api.github.com/repos/jupyter/notebook","labels_url":"https://api.github.com/repos/jupyter/notebook/issues/4050/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/notebook/issues/4050/comments","events_url":"https://api.github.com/repos/jupyter/notebook/issues/4050/events","html_url":"https://github.com/jupyter/notebook/issues/4050","id":365035838,"node_id":"MDU6SXNzdWUzNjUwMzU4Mzg=","number":4050,"title":" Kernel crashes with ModuleNotFoundError on 'prompt_toolkit.formatted_text'","user":{"login":"katcosgrove","id":22032257,"node_id":"MDQ6VXNlcjIyMDMyMjU3","avatar_url":"https://avatars0.githubusercontent.com/u/22032257?v=4","gravatar_id":"","url":"https://api.github.com/users/katcosgrove","html_url":"https://github.com/katcosgrove","followers_url":"https://api.github.com/users/katcosgrove/followers","following_url":"https://api.github.com/users/katcosgrove/following{/other_user}","gists_url":"https://api.github.com/users/katcosgrove/gists{/gist_id}","starred_url":"https://api.github.com/users/katcosgrove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katcosgrove/subscriptions","organizations_url":"https://api.github.com/users/katcosgrove/orgs","repos_url":"https://api.github.com/users/katcosgrove/repos","events_url":"https://api.github.com/users/katcosgrove/events{/privacy}","received_events_url":"https://api.github.com/users/katcosgrove/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-09-28T20:50:41Z","updated_at":"2018-10-02T15:43:15Z","closed_at":null,"author_association":"NONE","body":"With a fresh install of Jupyter in a clean pipenv or virtualenv, a new notebook crashes immediately upon launch with the following in terminal:\r\n```\r\n[I 13:39:55.748 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports\r\nTraceback (most recent call last):\r\n  File \"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/ipykernel_launcher.py\", line 15, in <module>\r\n    from ipykernel import kernelapp as app\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/ipykernel/__init__.py\", line 2, in <module>\r\n    from .connect import *\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/ipykernel/connect.py\", line 13, in <module>\r\n    from IPython.core.profiledir import ProfileDir\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/IPython/__init__.py\", line 55, in <module>\r\n    from .terminal.embed import embed\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/IPython/terminal/embed.py\", line 16, in <module>\r\n    from IPython.terminal.interactiveshell import TerminalInteractiveShell\r\n  File \"/Users/kat/Projects/jupyter_bug/ENV/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py\", line 20, in <module>\r\n    from prompt_toolkit.formatted_text import PygmentsTokens\r\nModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'\r\n[W 13:39:58.759 NotebookApp] KernelRestarter: restart failed\r\n[W 13:39:58.760 NotebookApp] Kernel d6c405e3-6b72-4be9-93fd-f44aecc78576 died, removing from map.\r\n```\r\nOriginally seen on an Ubuntu 18.04 machine using Python 3.7 and recreated on Mac OS Sierra and High Sierra with 3.7, as well as Ubuntu 16.04 with 2.7 and then 3.6. Four separate machines."},"comment":{"url":"https://api.github.com/repos/jupyter/notebook/issues/comments/426323763","html_url":"https://github.com/jupyter/notebook/issues/4050#issuecomment-426323763","issue_url":"https://api.github.com/repos/jupyter/notebook/issues/4050","id":426323763,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjMyMzc2Mw==","user":{"login":"miker985","id":26555712,"node_id":"MDQ6VXNlcjI2NTU1NzEy","avatar_url":"https://avatars0.githubusercontent.com/u/26555712?v=4","gravatar_id":"","url":"https://api.github.com/users/miker985","html_url":"https://github.com/miker985","followers_url":"https://api.github.com/users/miker985/followers","following_url":"https://api.github.com/users/miker985/following{/other_user}","gists_url":"https://api.github.com/users/miker985/gists{/gist_id}","starred_url":"https://api.github.com/users/miker985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miker985/subscriptions","organizations_url":"https://api.github.com/users/miker985/orgs","repos_url":"https://api.github.com/users/miker985/repos","events_url":"https://api.github.com/users/miker985/events{/privacy}","received_events_url":"https://api.github.com/users/miker985/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T15:43:15Z","updated_at":"2018-10-02T15:43:15Z","author_association":"NONE","body":"> pip install 'ipykernel<5.0.0'\r\n\r\nThis fixed the problem for me such that the Kernel would start and I could use my notebook."}}
{"actor":{"display_login":"miker985"}}