How to restart the kernel on my notebook in databricks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 08:22 AM
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?
- Labels:
-
Notebook
-
Python package
-
Restart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 08:59 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 08:02 AM
Follow-up question:
When other notebooks run Python code on the same cluster, will those runs be aborted when dbutils.library.restartPython() is called?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 06:16 AM
no, it's related only to current spark session