IPython widgets for the Jupyter Notebook
Questions tagged [ipywidgets]
973 questions
6
votes
3 answers
How to align and place ipywidgets
Is there a way to control the placement and alignment of ipywidgets (inside jupyter notebook)?
from ipywidgets import widgets
from IPython.display import Javascript, display
event_type_ui = widgets.Text(value='open', description='Test…

volodymyr
- 7,256
- 3
- 42
- 45
6
votes
1 answer
Improve HTML styling of Pandas DataFrames within IPython widgets
How can I generate appropriate HTML to hand to an ipywidgets.HTML object to properly display a Pandas DataFrame?

MRocklin
- 55,641
- 23
- 163
- 235
6
votes
0 answers
No Module Named Ipywidgets Error
I'm new in Ipython and Jupyter Notebook. I installed the ipywidgets module in Jupyter Notebook by using Anaconda prompt window.
I tried:
pip install ipywidgets
It said that the requirements had already satisfied. Then I tried to import the module…

Erdem
- 105
- 2
- 9
5
votes
5 answers
Jupyter Lab issue displaying widgets (javascript error)
I have troubles replicating a Jupyter Lab install on a new PC. It is working fine on my previous one.
I am unable to display simple widgets (like a checkbox from ipywidgets or ipyvuetify).
I checked that jupyter-widgets is enable with jupyter…

Fred Dujardin
- 127
- 1
- 1
- 8
5
votes
0 answers
Run all cells below when a button is clicked in Google Colab
I am trying to create a button with Placeholder text which after clicking runs all cells below it automatically. I am trying this in Google Colab.
My earlier solution for Jupyter notebook seems to stop working in Colab:
from IPython.display import…

Debayan Paul
- 95
- 2
- 9
5
votes
1 answer
How to use a tqdm progress bar in Jupyter?
I am coding an interface using the Jupyter widgets where the user configures a bunch of settings and then clicks a "Run" button. On clicking, this button calls a function implemented in another module. That function takes some time to run, so I…

GuPe
- 277
- 2
- 9
5
votes
0 answers
Is it possible to use ipywidgets in a Dash app?
I would like to use some dropdowns, combo-boxes and other complicated combinations of widgets from the ipywidgets library, which I have been developing in a jupyter notebook. However, I am forced to use plotly Dash for deployment. Is there a way I…

Eddy
- 6,661
- 21
- 58
- 71
5
votes
2 answers
Matplotlib figure is not updating with ipywidgets slider
I have the following code to generate a simple graph.
%matplotlib notebook
from ipywidgets import *
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2 * np.pi)
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
line, = ax.plot(x,…

john
- 51
- 2
- 2
5
votes
2 answers
Display IPython.display.HTML class objects inside ipywidgets
I want to display IPython.display.HTML object i.e. html_bt and widget i.e. bt inside HBox Layout. How do I achieve that? Is it even possible? Or how do I convert html_bt to widget objects?
Following is my code:
from ipywidgets import widgets,…

Vaishnavi Dongre
- 241
- 3
- 11
5
votes
1 answer
Update displayed value everytime ipywidgets are updated
In my notebook i have 7 FloatSlider widgets. I want to have the product of these 7 widgets displayed at all times in a way that, as the user moves the sliders, the value displayed is updated. Currently i am trying to display the product of the…

Brites
- 85
- 2
- 7
5
votes
0 answers
How can I alter the style of the Jupyter ipywidgets DatePicker widget?
I am using ipywidgets in a Jupyter Notebook, in particular, the DatePicker widget, and would like to know if there's a way to dig into the guts of the widget to alter its appearance. For example, the DatePicker widget comes wrapped in a box that…

neonjelly
- 51
- 5
5
votes
1 answer
Child widget creation in ipywidgets produces an error using ViewList and create_child_view
Summary
See the toy example Azure notebook hosted at this link. The notebook can be cloned and run, or downloaded and run locally, from there, but all of the code is also below for convenience.
When all the cells are run, the javascript console…

Rick
- 43,029
- 15
- 76
- 119
5
votes
2 answers
ipywidgets widgets values not changing
I am trying to get output from my ipywidgets widgets in Microsoft Azure Notebooks running Jupyter Notebooks in Python 3.6. However, it does not return new values when I get them. This also applies to the event handlers/interact never being called…

Kai O.
- 178
- 2
- 7
5
votes
1 answer
Non-blocking cell execution in Jupyter
In Jupyter with an ipython kernel, is there a canonical way to execute cells in a non-blocking fashion?
Ideally I'd like to be able to run a cell
%%background
time.sleep(10)
print("hello")
such that I can start editing and running the next cells…

Bananach
- 2,016
- 26
- 51
5
votes
1 answer
custom DatePicker in ipywidgets
I am using a DatePicker widget for selecting dates based on which I have to do some tasks in Jupyter notebook procedures.
The DatePicker widget is created using ipywidget library.
The problem which I am facing now is that it shows all the dates of…

Mayank Shekhar
- 91
- 1
- 3
- 8