Ipywidgets: widget do not display (7.0.0a3)

Created on 5 Jun 2017  路  4Comments  路  Source: jupyter-widgets/ipywidgets

The simplest test:
from ipywidgets import *
IntSlider()
returns:

A Jupyter Widget

This is running the notebook from a remote Ubuntu server.
Here's the library version used:

ipywidgets 7.0.0a3
IPython 5.4.1
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4]
jupyter 1.0.0

It works fine locally on a Mac, with exact same library version but Python version is 2.7.11.

I did run:

jupyter nbextension enable --py widgetsnbextension

But that didn't help. Any idea what could be wrong? I'm running out of ideas. I do need ipywidgets version 7 and above, because I want to use 'SelectionRangeSlider'.
Thanks.

Most helpful comment

Opening the console can make the browser cache refresh. It sounds like that might have been the problem - your browser was using its local copy of the code, rather than getting it again from the server.

See https://stackoverflow.com/a/7000899

All 4 comments

Are there any errors in the Chrome console?

Well, well... you are a magician! I just open the console, refresh and it suddenly works...
I feel like I was just missing the "jupyter nbextension enable --py widgetsnbextension" command, because that's what fixed it for me locally.
But after I did that remotely (on the server) it didn't work, I tried to restart the jupyter notebook, the kernel, refreshed countless time before but to no avail... I wonder if opening the console has something to do with it or not?
Thanks!

Opening the console can make the browser cache refresh. It sounds like that might have been the problem - your browser was using its local copy of the code, rather than getting it again from the server.

See https://stackoverflow.com/a/7000899

Makes sense, thanks.

Was this page helpful?
0 / 5 - 0 ratings