Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am using jupyter notebook, ipython 3 on windows. Whenever i am starting my python 3, i get the "Kernel Dead" message

Dead kernel The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

the above message is shown in notebook dashboard after i start python3.

[I 23:07:08.365 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 9938cea3-6528-4a27-b4c3-ee906d748bfb restarted
Traceback (most recent call last):
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\runpy.py"
, line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\runpy.py"
, line 85, in _run_code
    exec(code, run_globals)
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\ipykernel\__main__.py", line 3, in <module>
    app.launch_new_instance()
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\traitlets\config\application.py", line 588, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-123>", line 2, in initialize
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\traitlets\config\application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\ipykernel\kernelapp.py", line 417, in initialize
    self.init_io()
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\ipykernel\kernelapp.py", line 316, in init_io
    self.patch_io()
  File "c:\users\dharini\appdata\local\programs\python\python35-32\lib\site-pack
ages\ipykernel\kernelapp.py", line 326, in patch_io
    faulthandler_register = faulthandler.register
AttributeError: module 'faulthandler' has no attribute 'register'
[W 23:07:11.369 NotebookApp] KernelRestarter: restart failed
[W 23:07:11.369 NotebookApp] Kernel 9938cea3-6528-4a27-b4c3-ee906d748bfb died, r
emoving from map.
ERROR:root:kernel 9938cea3-6528-4a27-b4c3-ee906d748bfb restarted failed!
[W 23:07:11.390 NotebookApp] Kernel deleted before session
[W 23:07:11.392 NotebookApp] 410 DELETE /api/sessions/1cca4919-305f-4b4f-acdd-b2
a614fd2638 (::1) 3.00ms referer=http://localhost:8888/notebooks/Untitled.ipynb?k
ernel_name=python3

In command prompt i get the above shown message. What is the problem in the faulthandler module. How should I rectify it? I installed jupyter notebook by using "pip". I am new to python programming and also jupyter. please help me resolve this.

like image 370
dharinir Avatar asked Dec 11 '22 18:12

dharinir


1 Answers

We accidentally made a release of the ipykernel package which doesn't work on Python 3.5 on Windows. Once we realised this, we made a new release (version 4.3.1) to fix it.

You can upgrade by running:

pip install --upgrade ipykernel

If you had installed ipykernel using conda, the command would be:

conda update ipykernel
like image 191
Thomas K Avatar answered Dec 26 '22 19:12

Thomas K