jtpio / ipylab

Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ipylab and voila preview clash?

harmvanderheijden opened this issue · comments

I can't seem to get voila jupyterlab preview and ipylab working in the same ipynb. Reduced to the essentials, the problem is shown by the following code:

import ipylab
import ipywidgets as w
panel = ipylab.Panel() # uncomment this line, or else the button will not render in jupyterlab voila preview
button = w.Button(description="OK")
display(button)

If you render the above in a voila preview, the OK button is not shown. If you comment out the line with the ipylab Panel, the button renders correctly in the voila preview.

Enabled extensions on my setup:

  • @jupyter-voila/jupyterlab-preview v0.1.3 enabled OK
  • @jupyter-widgets/jupyterlab-manager v1.1.0 enabled OK
  • ipylab v0.1.3 enabled OK
  • jupyterlab_iframe v0.2.1 enabled OK
  • voila v0.1.0 enabled OK

Running JupyterLab 1.2.7 (I have not yet gotten voila to work with JupyterLab 2.0, keep getting incorrect dependencies when I try to install the voila preview extension).

I don't know if the problem is with ipylab or voila, but I'm posting it here since I've noticed you've worked on both projects.

Thanks @harmvanderheijden for trying this use case!

I don't expect it to work from within the voila preview, since the preview is running in its own IFrame. But running this code side by side the voila preview from a notebook should work.

I have not yet gotten voila to work with JupyterLab 2.0, keep getting incorrect dependencies when I try to install the voila preview extension.

Indeed, it hasn't been updated yet (hopefully in the coming days).