plotly.py: Installing plotly with ipywigets 7.5 fails to plot in jupyter lab
Hi,
I noticed that if I upgrade to the latest version of ipywidgets==7.5
this breaks FigureWidget
in my jupyter lab notebook (in offline mode).
The part of my docker file that install plotly looks like this:
RUN pip install plotly==3.10.0 jupyterlab==0.35 ipywidgets==7.5 psutil
# Install Jupyter Lab Extensions
# ------------------------------------------------------------------------------
RUN export NODE_OPTIONS=--max-old-space-size=4096 \
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager@0.38 --no-build \
&& jupyter labextension install plotlywidget@0.11.0 --no-build \
&& jupyter labextension install @jupyterlab/plotly-extension@0.18.2 --no-build \
&& jupyter lab build
I get the “Error displaying widget” message. Looking in the console gives me this error:
Uncaught (in promise) Module @jupyter-widgets/base, semver range ^1.2.0 is not registered as a widget module
vendors~main.dfdb0f7451aa8d94f759.js:460982 Error displaying widget
vendors~main.dfdb0f7451aa8d94f759.js:460983 Module @jupyter-widgets/base, semver range ^1.2.0 is not registered as a widget module
If I revert back to 7.4 then the error goes away. I only noticed this because I originally had my ipywidgets install line set to "ipywidgets>=7.2"
which is what the plotly.py install instructions recommend.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (5 by maintainers)
Hi all, yesterday we released version 4.0.0 of the
plotly
package which has support foripywidgets
7.5 when used with JupyterLab 1.0. See https://plot.ly/python/getting-started/ for installation instructions. Thanks!Hi @samueljackson92,
For ipywidgets 7.5 I think you’ll need
@jupyter-widgets/jupyterlab-manager@1.0.0
. We’ll be publishing a release candidate for plotly.py version 4 soon, and that will include instructions for JupyterLab 1.0 and ipywidgets 7.5. Stay tuned.