69

I have trouble stopping a given kernel in an iPython notebook.

Many times the cell is stuck, and I need to restart the entire kernel. The loop could be messy sometimes.

How can I stop the kernel?

peterh
  • 11,875
  • 18
  • 85
  • 108
aviyaron
  • 899
  • 1
  • 8
  • 10
  • 1
    Press esc and then double-press 0. Also try pressing h-key to check out other shortcuts. But if you just want to interrupt the kernel you can do double-press i. – Ulf Aslak Mar 24 '16 at 17:36
  • The stop (black square) button in the toolbar also works to interrupt the kernel (same as `i,i`) – Thomas K Mar 28 '16 at 18:24

2 Answers2

69

Click on 'Interrupt' under 'Kernel' in the toolbar. Pressing I twice will also do the trick.

Source - Is there an equivalent to CTRL+C in IPython Notebook in Firefox to break cells that are running?

Community
  • 1
  • 1
Ashish Tyagi
  • 807
  • 6
  • 5
4
  1. You can follow 'Kernel' --> 'Interrupt' in the menu bar at the top.
  2. Pressing 'I' to the left of the cell also works. This only works if you're in command mode. If not already enabled, press Esc to enable it.
  3. If you are okay to lose variables,you might restart the session.
sai_varshittha
  • 193
  • 1
  • 12