YEOMIN YOON
YEOMIN YOON

Reputation: 11

jupyter notebook ipywidgets not showing (no error)

I recently set up a new Conda environment and brought up previously working codes However, I found out that Jupyter widget does not seem to work properly

I did below things

conda install -c conda-forge ipywidgets

jupyter nbextension enable --py widgetsnbextension --sys-prefix

Could anyone tell me what am I missing??

from ipywidgets import widgets, Layout, Textarea, IntSlider, RadioButtons
transcripted = widgets.Textarea("hello", layout=Layout(width='100%', display='inline-flex', flex_flow = 'row wrap'))
submit_button = widgets.Button(description="submit")

display(transcripted)
display(submit_button)

the result is as below

Textarea(value='hello', layout=Layout(display='inline-flex', flex_flow='row wrap', width='100%'))
Button(description='submit', style=ButtonStyle())

screenshot

Upvotes: 1

Views: 9251

Answers (2)

YEOMIN YOON
YEOMIN YOON

Reputation: 11

To answer my own qustion.

(I am not administrator) I asked administrator to stop the jupyter notebook server and start it again.

After that it worked.

Upvotes: 0

Ransaka Ravihara
Ransaka Ravihara

Reputation: 1994

First, Save your work and close the notebook. Just run following command on cmd with run as administrator.

conda install -c conda-forge ipywidgets

It will also enable the extension for you (No need of run jupyter nbextension enable --py widgetsnbextension --sys-prefix)

After installing restart the notebook. It will fix your issue.

Refer to this as well!

Upvotes: 2

Related Questions