2

After installing ipywidgets in a Jupiter notebook, DSX (IBM Datascience Experience framework), it doesn't show the widget, just a static stuff or A Jupyter Widget

Example:

import ipywidgets as widgets

widgets.Dropdown(
    options = { 'One': 1, 'Two': 2, 'Three': 3 },
    value = 2,
    description = 'Number:',
)

Result: A Jupiter Widget

I have tried several versions of !jupyter nbextension enable --py widgetsnbextension --sys-prefix based on http://ipywidgets.readthedocs.io/en/latest/user_install.html, but I still got the same error message:

PermissionError: [Errno 13] Permission denied: '/usr/local/src/conda3_runtime/4.1.1/etc/jupyter/nbconfig/notebook.json'

Or installing with conda:

CondaIOError: IO error: Missing write permissions in: /usr/local/src/conda3_runtime/4.1.1

Antti29
  • 2,953
  • 12
  • 34
  • 36

3 Answers3

0

Users cannot install notebook extensions, such as the widgetsnbextension needed by ipywidgets, on DSX. IBM controls the configuration of the notebook server, including the list of enabled notebook extensions. At the moment, widgetsnbextension is not enabled. Therefore, you cannot make use of ipywidgets in DSX.

Your problem is similar to Enable nbextension on IBM Data Science Expeirence.

Roland Weber
  • 1,865
  • 2
  • 17
  • 27
0

have you tried

jupyter nbextension enable --py widgetsnbextension --user

see also: crashes on a permission

InLaw
  • 2,537
  • 2
  • 21
  • 33
-1

are there any plans to either ship ipywidgets out of the box, or some other alternative to enabling widgets?

Widgets is a pretty basic use case for Jupyter and not having it is quite limiting.

Jason Keirstead
  • 109
  • 1
  • 1
  • 4
  • I have found a workaround for this: use bokeh models and widgets! Example code: `from bokeh.models import CheckboxGroup, RadioGroup, Toggle from bokeh.layouts import column, row from bokeh.plotting import figure, show, output_file, output_notebook from bokeh.resources import INLINE output_notebook(resources=INLINE) toggle = Toggle(label='Some on/off', button_type='success') checkbox = CheckboxGroup(labels=['foo', 'bar', 'baz']) radio = RadioGroup(labels=['2000', '2010', '2020']) show(row(toggle, checkbox, radio))` – Anita Várai Sep 27 '17 at 14:21
  • This is not an answer, but a question. – Roland Weber Jan 17 '18 at 06:28