kernel died unexpectedly

5,507 views
Skip to first unread message

matt

unread,
Jun 19, 2012, 4:00:59 PM6/19/12
to spyd...@googlegroups.com
When I start an ipython session now, it works for a small amount of time (0-2 minutes), then fails with

 It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.



Then Windows makes me end the task and that same line keeps appearing in the Ipython console.  I can look into it further, but nobody else is seeing this? 

Carlos Córdoba

unread,
Jun 19, 2012, 4:25:21 PM6/19/12
to spyd...@googlegroups.com
Have you checked that the kernel attached to the console is still alive?
I mean, in the console (not IPython console) plugin?

El 19/06/12 15:00, matt escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/h-p9bt_2wAkJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

Matt Anderson

unread,
Jun 19, 2012, 4:38:31 PM6/19/12
to spyd...@googlegroups.com
Everything else in spyder still functions as normal (I believe this would not be the case if the console kernel had died) just the Ipython console gives up, if I restart it with your new tool, it seems to work fine for a while, then dies again.  How do I check if kernel attached to the console is still alive? 

On Tue, Jun 19, 2012 at 3:25 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
Have you checked that the kernel attached to the console is still alive? I mean, in the console (not IPython console) plugin?

El 19/06/12 15:00, matt escribió:
When I start an ipython session now, it works for a small amount of time (0-2 minutes), then fails with

 It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.



Then Windows makes me end the task and that same line keeps appearing in the Ipython console.  I can look into it further, but nobody else is seeing this?

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/h-p9bt_2wAkJ.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+unsubscribe@googlegroups.com.

Carlos Córdoba

unread,
Jun 19, 2012, 5:03:14 PM6/19/12
to spyd...@googlegroups.com
Please select the Console plugin and check that a tab called "IPyKernel (23987)" (where the number is the same as the one of console you see has died) and check that is not greyed out.

El 19/06/12 15:38, Matt Anderson escribió:
Everything else in spyder still functions as normal (I believe this would not be the case if the console kernel had died) just the Ipython console gives up, if I restart it with your new tool, it seems to work fine for a while, then dies again.  How do I check if kernel attached to the console is still alive? 

On Tue, Jun 19, 2012 at 3:25 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
Have you checked that the kernel attached to the console is still alive? I mean, in the console (not IPython console) plugin?

El 19/06/12 15:00, matt escribió:
When I start an ipython session now, it works for a small amount of time (0-2 minutes), then fails with

 It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.



Then Windows makes me end the task and that same line keeps appearing in the Ipython console.  I can look into it further, but nobody else is seeing this?

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/h-p9bt_2wAkJ.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.


--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

Matt Anderson

unread,
Jun 19, 2012, 5:11:35 PM6/19/12
to spyd...@googlegroups.com
It is greyed out, that is what has died and has to be restarted.

Carlos Córdoba

unread,
Jun 19, 2012, 5:28:24 PM6/19/12
to spyd...@googlegroups.com
Did you send some heavy/strange computations from the IPython console? or it just dies with no apparent reason?

El 19/06/12 16:11, Matt Anderson escribió:

Matt Anderson

unread,
Jun 19, 2012, 5:29:37 PM6/19/12
to spyd...@googlegroups.com
I don't even have to be using it for it to die...I was playing on the internet.

Carlos Córdoba

unread,
Jun 19, 2012, 5:39:03 PM6/19/12
to spyd...@googlegroups.com
What happens if you run ipython alone with

ipython qtconsole

from the terminal? Are you seeing the same behavior?

El 19/06/12 16:29, Matt Anderson escribió:

Matt Anderson

unread,
Jun 19, 2012, 6:01:19 PM6/19/12
to spyd...@googlegroups.com
Ipython qtconsole by itself will run all day.  Possibly I should mention I am on a windows 7 64 bit machine.  The amount of time before it dies in Spyder can be rather long, 5-10 minutes even.

Carlos Córdoba

unread,
Jun 19, 2012, 6:43:01 PM6/19/12
to spyd...@googlegroups.com
Do you seem something printed on the Internal Console plugin or on the kernel tab that shows why it died? Or could you use 'hg bisect' to try to detect what change introduced the problem? Also, if you updated IPython lately try to run 'ipython qtconsole' next to Spyder to see if thet show the same behavior.

Jed, I think you use a 64 bit Win 7 machine. Could you confirm this issue?

El 19/06/12 17:01, Matt Anderson escribió:

Massimo Di Stefano

unread,
Jun 19, 2012, 6:54:29 PM6/19/12
to spyd...@googlegroups.com
i don't know if this is the same problem but
on osx using the latest ipython (both qtconsole and notebook works fine)

i installed latest hg version of spyder, when i run the ipython from inside spyder with : 

open an  ipython console 

 i got :

[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-5576.json
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Library/Python/2.7/site-packages/spyderlib/widgets/externalshell/start_ipython_kernel.py in <module>()
    111 
    112 __ipythonshell__ = ipk_temp.shell
--> 113 set_edit_magic(__ipythonshell__)
        global set_edit_magic = <function set_edit_magic at 0x108706140>
        global __ipythonshell__ = <IPython.zmq.zmqshell.ZMQInteractiveShell object at 0x10f565fd0>
    114 
    115 #  Issue 977 : Since kernel.initialize() has completed execution, 

/Library/Python/2.7/site-packages/spyderlib/widgets/externalshell/start_ipython_kernel.py in set_edit_magic(shell=<IPython.zmq.zmqshell.ZMQInteractiveShell object>)
     82     elif programs.is_module_installed('IPython.frontend.qt', '>0.12'):
     83         shell.magics_manager.magics['line']['ed'] = \
---> 84           shell.magics_manager.magics['line']['edit']
        shell.magics_manager.magics = undefined
     85         shell.magics_manager.magics['line']['edit'] = open_in_spyder
     86     else:

AttributeError: 'ZMQInteractiveShell' object has no attribute 'magics_manager'


i'm on osx lion

i started spyfer with :

MacBook-Pro-di-Massimo:~ epifanio$ spyder -d
Start of MainWindow constructor
Initializing...
End of MainWindow constructor
*** Start of MainWindow setup ***
Loading object inspector...
Loading outline explorer...
Loading editor...
Loading file explorer...
Loading history plugin...
Loading online help...
Loading project explorer...
Loading external console...
Loading IPython console...
Loading namespace browser...
Setting up main window...
Setting up window...
*** End of MainWindow setup ***

Jed Ludlow

unread,
Jun 19, 2012, 7:31:10 PM6/19/12
to spyd...@googlegroups.com
On Tue, Jun 19, 2012 at 4:43 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
Do you seem something printed on the Internal Console plugin or on the kernel tab that shows why it died? Or could you use 'hg bisect' to try to detect what change introduced the problem? Also, if you updated IPython lately try to run 'ipython qtconsole' next to Spyder to see if thet show the same behavior.

Jed, I think you use a 64 bit Win 7 machine. Could you confirm this issue?


I do have Win 7 64-bit, but I'm running 32-bit Python. I cannot reproduce this behavior. I have yet to see a kernel self destruct like this.

Carlos Córdoba

unread,
Jun 19, 2012, 9:08:51 PM6/19/12
to spyd...@googlegroups.com
Hi Massimo,

That's not the same problem. It seems you're using IPython 0.13dev but you need to update to 0.13beta1 to make Spyder work again with the latest IPython. A simple git fetch for IPython should solve the problem.

Cheers,
Carlos

El 19/06/12 17:54, Massimo Di Stefano escribió:

Massimo Di Stefano

unread,
Jun 19, 2012, 10:00:24 PM6/19/12
to spyd...@googlegroups.com
Thanks Carlos,
git pull and problem fixed

so spyder-dev and ipython-dev are pretty i sync, grat job on both sides! :)

Massimo

Matt Anderson

unread,
Jun 20, 2012, 9:54:14 AM6/20/12
to spyd...@googlegroups.com
Well, good news bad news...I can no longer reproduce this error.  After rebooting my machine it no longer occurs, so chalk it up to a windows glitch I guess.  If it starts happening again I'll do a bisect on it.

matt

unread,
Jun 21, 2012, 9:51:06 AM6/21/12
to spyd...@googlegroups.com
A little more info on this.  It seems to be a Pyside problem.  I can recreate this issue when using Pyside, but not when using PyQt

Rakesh Kumar

unread,
Apr 5, 2016, 10:52:40 AM4/5/16
to spyder
Hi Carlos, I am facing same problem,
But i have given a heavy computation command, is it that reason I am getting the error "It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console." 

Carlos Córdoba

unread,
Apr 5, 2016, 10:54:26 AM4/5/16
to spyd...@googlegroups.com
I don't know. Does the kernel die when you run simple computations or not?

El 05/04/16 a las 09:51, Rakesh Kumar escribió:
Hi Carlos, I am facing same problem,
But i have given a heavy computation command, is it that reason I am getting the error "It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console." 
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

To post to this group, send email to spyd...@googlegroups.com.

Jonatan Hjul

unread,
Apr 7, 2016, 8:15:51 AM4/7/16
to spyder
I have an issue which might be related. I get exactly the same problem when using matplotlib in Ipython: "It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console."

 If I run it in a normal console inside spyder it dies - if I run it in a normal console outside spyder there is no problem.

To reproduce run:
"""
from pylab import *

plot([1], [2])
"""

My configuration is:
Python 3.5.1 |Anaconda 2.2.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)]

I have not tried it on my linux machine yet, but this seems to be a problem starting recently, maybe due to an upgrade of Anaconda.

/Jonatan

Carlos Córdoba

unread,
Apr 7, 2016, 9:09:41 AM4/7/16
to spyd...@googlegroups.com
Are you using the Tk backend for matplotlib?

El 07/04/16 a las 07:15, Jonatan Hjul escribió:

Jonatan Hjul

unread,
Apr 7, 2016, 12:33:42 PM4/7/16
to spyder
It should be QT...

William Baker Morrison

unread,
Apr 11, 2016, 8:02:46 PM4/11/16
to spyder
Hi Carlos,

I'm getting "kernel died" errors on my IPython Spyder console too (Python 2.7, Spyder 2.3.8, Windows 7), no computations but just as soon as I start up the program. Tried resetting Spyder to defaults and also installing the latest version of Anaconda but no luck. Any tips?

Many thanks,
Will
Reply all
Reply to author
Forward
0 new messages