Hi there, I downloaded the example plotly + jupyter-widgets notebook but am having trouble displaying a
My first imports work fine:
import plotly.plotly as py from plotly.graph_objs import *
The next one gives a red warning:
from plotly.widgets import GraphWidget
Warning text (screenshot):
/Users/ryan/.local/lib/python3.4/site-packages/IPython/html.py:14: ShimWarning: The `IPython.html` package has been deprecated. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`. /Users/ryan/.local/lib/python3.4/site-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
g = GraphWidget('https://plot.ly/~chris/4099')
but attempting to display it fails:
Several JS errors are logged:
The error message that jumps out at me from them is:
Class GraphView not found in registry at http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js:31987:25 at Object.loadClass (http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js:31948:13) at http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js:32171:23
This issue (https://github.com/ipython/ipywidgets/issues/233; I can’t put more than two links in a post apparently) implies that version mismatches between jupyter/widget components can cause errors like this, but it seems like all my versions are consistent:
$ pip list | grep widgets ipywidgets (5.1.5) widgetsnbextension (1.2.3) $ conda list | grep widgets ipywidgets 5.1.5 py34_0 https://conda.binstar.org/conda-forge/osx-64/ipywidgets-5.1.5-py34_0.tar.bz2 widgetsnbextension 1.2.3 py34_1 https://conda.binstar.org/conda-forge/osx-64/widgetsnbextension-1.2.3-py34_1.tar.bz2 $ pip list | grep jupyter jupyter (1.0.0) jupyter-client (4.2.2) jupyter-console (4.1.1) jupyter-core (4.1.0) $ conda list | grep jupyter jupyter 1.0.0 <pip> jupyter-client 4.2.2 <pip> jupyter-console 4.1.1 <pip> jupyter-core 4.1.0 <pip> jupyter_client 4.2.2 py34_0 https://conda.binstar.org/conda-forge/osx-64/jupyter_client-4.2.2-py34_0.tar.bz2 jupyter_core 4.1.0 py34_0 https://conda.binstar.org/conda-forge/osx-64/jupyter_core-4.1.0-py34_0.tar.bz2 $ conda list | grep plotly plotly 1.11.0 <pip> $ pip list | grep plotly plotly (1.11.0) $ python --version Python 3.4.4 :: Anaconda 2.2.0 (x86_64) $ jupyter --version 4.1.0
This is a Python 3 kernel and my Jupyter server and all paths should be pointing to Python3 libraries.
I’m out of leads but would really like to be able to use plotly jupyter widgets; any help would be appreciated, thanks!