# Does plotly work with Jupyterlab 4?

**URL:** <https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095>\
**Category:** 📊 Plotly Python\
**Created:** [June 14, 2023, 4:00pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095 "2023-06-14T16:00:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpats](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dpats](https://community.plotly.com/u/dpats)\
**Post date:** [June 14, 2023, 4:00pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/1 "2023-06-14T16:00:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [June 14, 2023, 4:53pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/2 "2023-06-14T16:53:02Z")

</div>

hi @dpats  
👋 Welcome to the community.

We’ve been having a few challenges with Jupyterlab 4 ourselves.

I’ve talked to my colleague that has been trying to set up jupyterlab4, and has faced many issues.

He would recommend not to use jlab4 yet, it seems to have all sorts of issues that the jupyter folks need to resolve.

---

<div class="post-metadata">

**Author:** ![dpats](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dpats](https://community.plotly.com/u/dpats)\
**Post date:** [June 14, 2023, 8:29pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/3 "2023-06-14T20:29:19Z")

</div>

Thanks so much for the reply!

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.

Thanks again!

---

<div class="post-metadata">

**Author:** ![gsacavdm](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@gsacavdm](https://community.plotly.com/u/gsacavdm)\
**Post date:** [November 25, 2023, 3:21pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/4 "2023-11-25T15:21:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [November 27, 2023, 2:52pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/5 "2023-11-27T14:52:51Z")

</div>

hi @gsacavdm  
Unfortunately, there is no update on this matter. Our recommendation is to use JupyterLab 3.

---

<div class="post-metadata">

**Author:** ![dpats](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dpats](https://community.plotly.com/u/dpats)\
**Post date:** [November 27, 2023, 3:13pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/6 "2023-11-27T15:13:00Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![gsacavdm](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@gsacavdm](https://community.plotly.com/u/gsacavdm)\
**Post date:** [December 2, 2023, 7:04am UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/7 "2023-12-02T07:04:04Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [December 5, 2023, 8:35pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/8 "2023-12-05T20:35:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mwouts](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mwouts/32/31081_2.png) [@mwouts](https://community.plotly.com/u/mwouts)\
**Post date:** [December 10, 2023, 12:34pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/9 "2023-12-10T12:34:48Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![mwouts](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mwouts/32/31081_2.png) [@mwouts](https://community.plotly.com/u/mwouts)\
**Post date:** [December 30, 2023, 11:21am UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/10 "2023-12-30T11:21:00Z")

</div>

Actually I am able to use `plotly==5.15` with Jupyter Lab 4, so the latest version probably works well too.

@adamschroeder maybe you meant that there is still some work remaining to get `dash`, not `plotly`, compatible with Jupyter Lab 4?

---

<div class="post-metadata">

**Author:** ![jvschoen](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jvschoen](https://community.plotly.com/u/jvschoen)\
**Post date:** [January 1, 2024, 4:26am UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/11 "2024-01-01T04:26:36Z")

</div>

I was able to get plotly to render in jupyterlab (4.0.10)

In the jupyterlab environment (that runs the jupyterlab server), I reordered plotly to be at the top.

```auto
plotly==5.18.0
# Results in 4.0.10 being installed
jupyterlab>=3 
# Results in 8.1.1 being installed
ipywidgets>=7.6 

```

In the kernel env I also locked in `plotly==5.18.0` and all is rendering. I also did `nbformat==5.9.2` which also seemed required to get running

---

<div class="post-metadata">

**Author:** ![schausson31](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@schausson31](https://community.plotly.com/u/schausson31)\
**Post date:** [January 3, 2024, 1:17pm UTC](https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095/12 "2024-01-03T13:17:54Z")

</div>

Hello,  
I’m pretty new to plotly/dash, but I could make the “simple app example” (coming from [https://dash.plotly.com/minimal-app](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:

```auto
app.run(debug=True)

```

to:

```auto
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 …

Did someone successfully make it work ?

Thanks for your help  
Sebastien
