cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!