Repeated "Kernel died, restarting" forever
<p>When I attempt to run</p>

<pre><code>$ jupyter qtconsole
</code></pre>

<p>The console shows up, with the message</p>

<pre><code>Kernel died, restarting
________________________
Kernel died, restarting
________________________
Kernel died, restarting
________________________
Kernel died, restarting
________________________
Kernel died, restarting
________________________
</code></pre>

<p>Which continues.</p>

<p>Trying <code>$ jupyter qtconsole --debug</code> didn't print anything else, and neither has adding</p>

<pre><code>c.Application.log_level = 0
c.Session.debug = True
</code></pre>

<p>into <code>$USERHOME/.jupyter/jupyter_qtconsole_config.py</code></p>

<p>Also, I found nothing in <code>$USERHOME/.ipython/profile_default/log/</code> and the other directories around there.</p>

<p>Nothing has changed in my configuration since last time I started up <code>jupyter-qtconsole</code>.</p>

<p>How can I at least find out what's going wrong with the kernel? Surely there is some option in Jupyter to get the kernel's STDERR output to see what exception had upset it?</p>

<p>Given that the kernel is another process, I was able to catch the command line it was started with, using Process Explorer. The command line was</p>

<pre><code>$ pythonw -m ipykernel -f "$USERHOME/AppData/Roaming/jupyter/runtime/kernel-2744.json"
</code></pre>

<p>Then, I just launched <code>python</code> and tried importing <code>ipykernel</code>, and got this:</p>

<pre><code>$ python
Python 2.7.12 [...] on win32
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import ipykernel
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Programs\Python2712\lib\site-packages\ipykernel\__init__.py", line 2,
 in &lt;module&gt;
    from .connect import *
  File "C:\Programs\Python2712\lib\site-packages\ipykernel\connect.py", line 13,
 in &lt;module&gt;
    from IPython.core.profiledir import ProfileDir
  File "C:\Programs\Python2712\lib\site-packages\IPython\__init__.py", line 48,
in &lt;module&gt;
    from .core.application import Application
  File "C:\Programs\Python2712\lib\site-packages\IPython\core\application.py", l
ine 25, in &lt;module&gt;
    from IPython.core import release, crashhandler
  File "C:\Programs\Python2712\lib\site-packages\IPython\core\crashhandler.py",
line 28, in &lt;module&gt;
    from IPython.core import ultratb
  File "C:\Programs\Python2712\lib\site-packages\IPython\core\ultratb.py", line
119, in &lt;module&gt;
    from IPython.core import debugger
  File "C:\Programs\Python2712\lib\site-packages\IPython\core\debugger.py", line
 36, in &lt;module&gt;
    from IPython.utils import PyColorize, ulinecache
  File "C:\Programs\Python2712\lib\site-packages\IPython\utils\PyColorize.py", l
ine 55, in &lt;module&gt;
    from IPython.utils.py3compat import PY3
  File "C:\Programs\Python2712\lib\site-packages\IPython\utils\py3compat.py", li
ne 296, in &lt;module&gt;
    PYPY = platform.python_implementation() == "PyPy"
AttributeError: 'module' object has no attribute 'python_implementation'
&gt;&gt;&gt; exit()
</code></pre>

<p>And this quickly led to the problem, as described in <a href="http://stackoverflow.com/a/27391094/1143274">this answer</a>, being that the directory I was trying to start <code>jupyter qtconsole</code> in had a subdirectory called <code>platform</code>, which conflicted with the name of a module.</p>

<p>While this fixes this specific instance of "Kernel died, restarting", the general question still stands: how to make sure that the stacktrace, like the one above, is reported to the user of Jupyter console, instead of the kernel dying silently?</p>

python jupyter qtconsole jupyter-console