Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6408

Restart kernel in Google Colab

$
0
0

I´m trying to restart the kernel in a Google Colab Jupyter Notebook through a cell. The option given previously:

import osos._exit(00)

is ok, but it seems to me that this is not a very "pythonic" way of restarting the kernel. The other option:

from IPython.core.display import HTMLHTML("<script>Jupyter.notebook.kernel.restart()</script>")

seems more "pythonic" (better) to me, but it is not working.

Is there something specific to Google Colab that I should have done?

Best regards,

Gustavo,


Viewing all articles
Browse latest Browse all 6408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>