Using ipywidgets latest versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 04:18 AM
Hello everyone,
I upgraded my cluster to DBR 13.0, which comes with ipywidgets version 7.7.2 installed.
However, I want to use the TagsInput widget, which is new since version 8.0.4.
If i upgrade the ipywidgets package to version 8.0.4, none of the widgets (like the basic IntSlider) run anymore. I get this error:
"Stale widget: cannot display widget because the python repl changed. Please rerun the notebook"
If I downgrade the version again to 7.7.2, the other widgets work again.
Is there any way i can use the TagsInput widget in my databricks notebook?
Or does anyone know alternatives for that widget? The dbutils widgets doesn't provide enough functionality, I need to select multiple from a list of +- 10k items, with a kind of search function.
Thanks in advance
- Labels:
-
Dbutils
-
Ipywidgets
-
Multiselect
-
Package
-
Widget
-
Widgets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2023 08:36 AM
@Tessa Ickx :
It seems that the issue you are experiencing is related to compatibility between different versions of ipywidgets. The TagsInput widget was introduced in version 8.0.4, so you would need at least that version to use it. However, upgrading to a newer version of ipywidgets might cause issues with the widgets that are already in use in your notebook.
One possible solution would be to use a virtual environment to install a newer version of ipywidgets just for the TagsInput widget. You could create a new environment with a specific version of ipywidgets and install the TagsInput widget in that environment. Then, you could use that environment for the specific notebook where you need to use the TagsInput widget.
Another option would be to use a different library for the functionality you need. One possibility is to use the SelectMultiple widget from ipywidgets, which allows selecting multiple options from a list. You could use a dropdown widget to display the list of available options, and use a text input widget to filter the options based on the user's input.
Alternatively, you could also consider using a different library, such as react-select or react-virtualized-select, which provide more advanced features for selecting multiple options from a large list. These libraries are based on React and can be used in a notebook by embedding them in an iframe using the
displayHTML function from IPython.core.display.
I hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 12:32 PM
Hello Suteja,
Thank you for the reply. However, I think you didn't understand me correctly.
If I use a version older than version 8.x.x., everything works fine, except the TagsInput of course because it wasn't introduced yet. If I use version 8.0.4. or newer, NONE of the widgets work. Also not TagsInput. Nothing from the package seems to work, I get the error I posted before.
A virtual environment would not solve it, I believe?
I tried using SelectMultiple from ipywidgets, but since I need to choose from a very extensive list, and need a search function, it doesn't suit my needs, like described earlier.
I have not tried yet react-select or react-virtualized-select. I can try this, do you have any kind of documentation for such a multi-select widget with a search functionality?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 12:38 AM
Hi @Tessa Ickx
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 10:33 AM
I can confirm that installing a newer ipywidgets library version at a cluster level does not resolve these issues.
The arcgis library relies on ipywidgets v8 to render maps. Even when I install ipywidgets > 8 at the cluster level, the widgets still do not render.
Will Databricks institute support for ipywidgets 8 in any of its LTS DBRs? ipywidgets version 8 has been around for over 2 years at this point, and many applications are building on it.

