Panel interactivity in Microsoft Fabric notebooks

Hello!

I am trying to make panel interactivity work in Microsoft Fabric notebooks running python kernel. However, there are issues with the interactivity/serving. My workaround to this problem is to render panel widgets as ipywidget (whose interactivity works in Fabric notebooks) following “Render as ipywidget” in https://panel.holoviz.org/how_to/notebook/notebook.html

Running panel cells with “pn.extenstion()” outputs the panel widgets, but with no interactivity. Running with “pn.extension(comms=‘ipywidgets’)”, makes the panel output disappear completely. My aim is to run panel with interactivity in the notebook.

Would very much appreciate help on this topic!

Example code:
“”"
!pip install jupyter_bokeh jupyter_contrib_nbextensions ipywidgets jupyterlab_widgets widgetsnbextension param panel holoviews

#install nodejs as needed by many jupyterLab extensions
!conda install -c conda-forge nodejs -y

#enable extensions
!jupyter nbextension enable --py widgetsnbextension
!jupyter labextension enable powerbi-jupyter-client
!jupyter labextension enable plotly/dash-jupyterlab

build to ensure extensions are properly integrated

!jupyter lab clean --all
!jupyter lab build --debug

import bokeh.io
bokeh.io.output_notebook()
import panel as pn

Enable the Panel extension with ipywidgets communication

pn.extension(comms=“ipywidgets”)

slider = pn.widgets.IntSlider()
pn.Column(slider, pn.bind(lambda x: x, x=slider)).servable()
“”"

Both extensions mentioned in https://panel.holoviz.org/how_to/notebook/notebook.html are present as seen by running:
“”“!jupyter labextension list”“”
which gives
“”“JupyterLab v4.4.5
/home/trusted-service-user/jupyter-env/python3.11/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
@jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)
@bokeh/jupyter_bokeh v4.0.5 enabled OK (python, jupyter_bokeh)
@jupyter-notebook/lab-extension v7.4.4 enabled OK
@pyviz/jupyterlab_pyviz v3.0.6 enabled OK
“””