ipydatagrid icon indicating copy to clipboard operation
ipydatagrid copied to clipboard

Using ipydatagrid in JupyterLite/Pyodide?

Open deeplook opened this issue 3 years ago • 7 comments

Is there a way to use ipydatagrid in JupyterLite running on Pyodide? Just micropip-installing it won't work. I assume it might be doable when it gets pre-installed in the JupyterLite instance, but I'm looking for confirmation and maybe some clues of doing that.

deeplook avatar Apr 26 '22 09:04 deeplook

It's possible, you need to micropip install and have the labextension installed.

martinRenou avatar Apr 26 '22 09:04 martinRenou

Looking at https://jupyterlite.readthedocs.io/en/latest/configuring.html#demo-extension-notes gives the impression that for now I have to spot and copy all dependencies of a labextension manually to JL, correct?

deeplook avatar Apr 26 '22 16:04 deeplook

Correct, I think. Though the jupyter lite build command might automatically find the labextensions installed under your environment path.

martinRenou avatar Apr 26 '22 16:04 martinRenou

I'm running into this maybe related JupyterLite issue, https://github.com/jupyterlite/jupyterlite/issues/620, described there for ipywidgets.

deeplook avatar Apr 27 '22 09:04 deeplook

Last time we looked into adding ipydatagrid to the demo site there seemed to be some issues: https://github.com/jupyterlite/jupyterlite/pull/145#issuecomment-863221729

Maybe worth trying again now to see if that's still the case.

jtpio avatar Apr 27 '22 12:04 jtpio

Just tried with the jupyterlite-xeus-python kernel (https://github.com/jupyterlite/xeus-python-kernel) and it seems to be working well now with the basic example:

image

jtpio avatar Jul 11 '22 12:07 jtpio

Linking to an example notebook if you want to try it out: https://scipy-2022-jupyterlite-virtual-poster.readthedocs.io/en/latest/lite/lab?path=notebooks%2Fipydatagrid.ipynb

jtpio avatar Jul 11 '22 16:07 jtpio