jupyterlab-contrib / jupyterlab-spreadsheet-editor

JupyterLab spreadsheet editor for tabular data (e.g. csv, tsv)
BSD 3-Clause "New" or "Revised" License
135 stars 7 forks source link

Support for Jupyterlite #62

Closed vfreysz closed 8 months ago

vfreysz commented 9 months ago

This is an awesome feature for jupyterlab.

When i try to install it in jupyterlite 0.2.3 (https://jupyterlite.readthedocs.io) i have the following error.

ValueError: Can't find a pure Python 3 wheel for 'tornado>=6.1.0'.
See: https://pyodide.org/en/stable/usage/faq.html#why-can-t-micropip-find-a-pure-python-wheel-for-a-package
You can use `await micropip.install(..., keep_going=True)` to get a list of all packages with missing wheels.

Not sure why, since tornado is used by jupyterlab server.

krassowski commented 9 months ago

I think this would be solved with https://github.com/jupyterlab-contrib/jupyterlab-spreadsheet-editor/issues/61. I will add a comment here you once the lab 4.0 upgrade is ready for testing

krassowski commented 8 months ago

Can you test with jupyterlab-spreadsheet-editor v0.7.1?

vfreysz commented 8 months ago

I can't make it work. When I try on my server or on https://jupyter.org/try-jupyter/lab/

import micropip
await micropip.install("jupyterlab-spreadsheet-editor")

there is no more warning but it seems that nothing happened...

Insert lines icons does not show up when i open a csv file.

martinRenou commented 8 months ago

Ah unfortunately you won't be able to install this extension that way. You need to make your own deployment of Jupyterlite and follow this guide for installing external extensions.

Installing packages with micropip is only useful to install Python modules in the Python runtime, you won't be able to install JupyterLab extensions.

vfreysz commented 8 months ago

Thanks, I had forgotten that.

Works perfectly now.

My docker composes if anyone wants to test.

version: "3.7"
services: 
  jupyterlite:
    image: continuumio/miniconda3
    command: bash -c "
      pip install jupyterlite-core==0.2.3 && \
      pip install jupyter_server && \
      pip install jupyterlite-pyodide-kernel && \
      pip install jupyterlite-core[all] && \
      pip install ipywidgets==8.1.1 &&\
      pip install jupyterlab-spreadsheet-editor &&\
      pip install bqplot &&\
      pip install plotly &&\

      jupyter lite build &&\
      jupyter lite serve --port=8087"
    ports: 
      - 8087:8087
    container_name: jupyterlite
krassowski commented 8 months ago

Works perfectly now.

:tada: Thanks for confirming - I will close this issue now.