I recently updated my Jupyterlab and Jupyterhub to v4 and can no longer get plotly plots to appear. I installed both nodejs and plotly 5.15 via conda into the conda environment launching the notebook.
Below is the following error I am receiving in the notebook:
Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class ‘FigureModel’ from module ‘jupyterlab-plotly’
Error: No version of module jupyterlab-plotly is registered
at f.loadClass (localhost:8000/user/david/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.402424ef4079078b2e0e.js?v=402424ef4079078b2e0e:1:74855)
There are more messages in the stack trace but will stop at this one for now
Any ideas on how to resolve or update on Jupyterlab 4 support?
I was doing a deep dive in both the plotly and jupyter-widgets repos/issues and coming up empty. It seems like multiple commits have been made to make everything work with JupyterLab 4, so thought I was doing something wrong. Glad to hear I’m not the only one.
Hi @adamschroeder , just checking back on this to see if there are updates RE: plotly supporting Jupyterlab4.
I have a setup which I upgraded from jupyterlab 3.x to jupyterlab4 which somehow is working with plotly. However I haven’t been able to get it working on a different machine - neither through a fresh install of Jupyterlab4 + Plotly nor by installing jupyterlab 3.6.6 and then upgrading to 4.x
@gsacavdm … yeah … I was going to say the same thing. I am currently building my Docker containers with JupyterLab 3.6.6 in order to get things to work. Disappointing, but it works.
@adamschroeder , out of curiosity what’s the challenge with supporting JupyterLab 4?
And do you guys have any rough sense on when you plan to support it?
hi @gsacavdm
We don’t have a good sense of when Dash would work with JupyterLab 4. We were hoping it would work as soon as JupyterLab 4 was released but we found some incompatibilities.
For what it’s worth the PNG rendering of plotly plots does work in Jupyter Lab 4. Install kaleido with pip install -U kaleido and add this to your notebook:
import plotly.io as pio
pio.renderers.default = "png"
With the PNG renderer, plots are not interactive, but if you have to use JLab 4 then it’s better than no plots at all.
Hello,
I’m pretty new to plotly/dash, but I could make the “simple app example” (coming from https://dash.plotly.com/minimal-app) work with jupyterLab 4.0.10 & plotly 5.18.0. Anyway, If I try to change the way to run the dash application from:
app.run(debug=True)
to:
app.run(jupyter_mode="jupyterlab")
well, nothing happens when I execute the cell of the notebook…although I would expect another “tab” to open in jupyterlab …