cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restart the kernel on my notebook in databricks?

Paddy_chu
New Contributor

while installing a python package on my databricks notebook, I kept getting a message saying that: "Note: you may need to restart the kernel using dbutils.library.restartPython() to use updated packages."

I've tried restarting my cluster, also detach and reattach my cluster but the Note message still pops up on my notebook, after I ran my code.

Anyone knows how to solve this issue?error message

1 REPLY 1

Evan_MCK
Contributor

dbutils.library.restartPython()

Just run this code in the notebook without restarting the cluster or using pip install again. Restarting the cluster erased what you just installed with pip and you are back to square one. Restarting python after the pip installs will leave the packages installed and just restart the python interpreter.

see this: https://stackoverflow.com/a/75333780/22103209