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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.