Ipywidgets: interact() does not display interactive UI elements

Created on 26 Oct 2017  Â·  9Comments  Â·  Source: jupyter-widgets/ipywidgets

The primary issue is that the none of the interactive UI elements appear in the output cell (I'm executing a copy of the ipywidgets examples).

screen shot 2017-10-26 at 11 42 01 am

This is true whether I use a Python 2.7 or Python 3.6 kernel. I've tried re-installing ipywidgets and running jupyter nbextension enable --py widgetsnbextension w/ no effect.

It did initially work when running jupyter notebook from the ipywidgets examples directory locally.

...but after updating several packages via conda (jupyter, notebook, nbformat, et al) in attempts to resolve this issue this method too produces no interactive widgets in output cell.

resolved-locked

Most helpful comment

@jasongrout that was the entire jupyter nbextension list output above.

Deleting /Users/me/.jupyter/nbconfig/notebook.json worked!

Cheers.

All 9 comments

What versions of widgetsnbextension, ipywidgets, and notebook do you have installed?

What does jupyter nbextension list give?

Known nbextensions:
  config dir: /Users/me/.jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled
      - Validating: OK

what versions of the packages too?

conda list
appnope                   0.1.0            py35hd172556_0
bleach                    1.5.0                    py35_0
bokeh                     0.12.10          py35h73fb791_0
certifi                   2016.2.28                py35_0
cycler                    0.10.0           py35hb89929e_0
decorator                 4.1.2                    py35_0
entrypoints               0.2.3                    py35_0
freetype                  2.8                  h143eb01_0
html5lib                  0.9999999                py35_0
intel-openmp              2018.0.0             h68bdfb3_7
ipykernel                 4.6.1            py35h9865fc8_0
ipython                   6.1.0            py35h3f7db8a_1
ipython_genutils          0.2.0                    py35_0
ipywidgets                7.0.0            py35hb70205d_0
jedi                      0.10.2           py35heb0647e_0
jinja2                    2.9.6                    py35_0
jsonschema                2.6.0                    py35_0
jupyter_client            5.1.0            py35hfe06ecd_0
jupyter_core              4.3.0                    py35_0
libcxx                    4.0.1                h579ed51_0
libcxxabi                 4.0.1                hebd6815_0
libgfortran               3.0.1                h93005f0_2
libpng                    1.6.32               hce72d48_2
libsodium                 1.0.13               hba5e272_2
markupsafe                1.0                      py35_0
matplotlib                2.1.0            py35hc2166d4_0
mistune                   0.7.4                    py35_0
mkl                       2018.0.0             h5ef208c_6
nbconvert                 5.2.1                    py35_0
nbformat                  4.4.0                    py35_0
networkx                  2.0              py35hb193ae4_0
notebook                  5.0.0            py35he0030f0_2
numpy                     1.13.3           py35hfd7066c_0
openssl                   1.0.2l                        0
pandas                    0.20.3           py35h5e2f206_2
pandocfilters             1.4.2                    py35_0
pexpect                   4.2.1            py35hde8bc66_0
pickleshare               0.7.4            py35h9517181_0
pip                       9.0.1                    py35_1
prompt_toolkit            1.0.15           py35h93950c5_0
ptyprocess                0.5.2            py35hfc37984_0
pygments                  2.2.0                    py35_0
pyparsing                 2.2.0            py35h31fab04_0
python                    3.5.4                         0
python-dateutil           2.6.1            py35h10515e0_1
pytz                      2017.2           py35h9789cde_1
pyyaml                    3.12             py35hf8cec8a_1
pyzmq                     16.0.2           py35h1c7c2ed_2
readline                  6.2                           2
setuptools                36.4.0                   py35_1
simplegeneric             0.8.1            py35h0a3d746_0
six                       1.10.0                   py35_0
sqlite                    3.13.0                        0
terminado                 0.6              py35hf269ddc_0
testpath                  0.3.1                    py35_0
tk                        8.5.18                        0
tornado                   4.5.2            py35h4099233_0
traitlets                 4.3.2                    py35_0
wcwidth                   0.1.7            py35hdd0c235_0
wheel                     0.29.0                   py35_0
widgetsnbextension        3.0.2            py35hdbe965d_1
xz                        5.2.3                         0
yaml                      0.1.7                hff548bb_1
zeromq                    4.2.2                h131e0f7_1
zlib                      1.2.11                        0

Yes, that contains the info.

Okay, to check: there are no other widgets extensions listed in jupyter nbextension list, like at the sys-prefix level?

Assuming not, the first thing I'd do is to enable at the sys-prefix level: jupyter nbextension enable --sys-prefix --py widgetsnbextension. I'd probably also delete the user config file at /Users/me/.jupyter/nbconfig/notebook.json, if it didn't have anything else in it.

@jasongrout that was the entire jupyter nbextension list output above.

Deleting /Users/me/.jupyter/nbconfig/notebook.json worked!

Cheers.

Great! It sounds like the javascript was installed at the sys-prefix level, but the plugin was enabled at the user level (and it couldn't find the javascript at the user level).

I solved by change another Browser-Chrome,and it worked, the browser I used before was UC, create by China.

Was this page helpful?
0 / 5 - 0 ratings