Plolty.js has different version between notebook and script fromn same venv


I am trying to use the latest โ€˜layerโ€™ option in my charts, but I noticed that the same code is working on a single file python, but not inside a notebook (VS Code notebook).
I use the code from the plotly website illustrating the new feature.

I realised that inside the notebook this is not the same version of plotly.js that is used when I hover the Plotly logo:

  • script file - launch browser page with localhost: version=v2.32.0
  • notebook inside VS Code: version=v2.29.1

I am using the same venv for both notebook kernel and script.

How is that possible? DOes it mean that the notebook plotly fallback to another version installed somewhere I dont know.
This is driving me a bit crazy for the past hoursโ€ฆ

Just done a fresh reinstall of vscode, but same thing happen in a notebook environment.

Ok the answer is that plotly will use the vscode renderer inside vscode notebooks, which is bundled into VSCode, and, as the documentation states in the renderers page, lags a bit behind from latest releases.