Ipysheet in TLJH: "Failed to load model class 'SheetModel' from module 'ipysheet'"

Hi, I am trying to use ipysheet in a Jupyterlab notebook running in TLJH Version 3.6.1, with this instructions

from  ipysheet import sheet

but I am getting a Javascript error:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'SheetModel' from module 'ipysheet'

This happens both using Jupyterlab and a classic Jupyter notebook.
The expected output is a table rendered this way:

I tried running the same code on a fresh local Miniconda install (no Jupyterhub), and after installing the ipysheet library, the same code has the expected output, both in Jupyterlab and in Classic Notebook interface.

I tried to downgrade the libraries in the conda virtual environment that I am using in TLJH to match the libraries in the Miniconda install, but the problem persists.

The libraries I am using in the TLJH server:

:~$ conda list | grep ipy
ipykernel                 6.19.2             pyh210e3f2_0    conda-forge
ipysheet                  0.7.0              pyhd8ed1ab_0    conda-forge
ipython                   8.10.0             pyh41d4057_0    conda-forge
ipywidgets                8.0.4              pyhd8ed1ab_0    conda-forge
:~$ conda list | grep jupy
jupyter_client            8.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.3.0           py311h38be061_0    conda-forge
jupyterlab_widgets        3.0.5              pyhd8ed1ab_0    conda-forge

The same versions are installed in the local Miniconda install. Both TLJH is running in a Ubuntu 20.04.5 LTS Docker container, while Miniconda is running directly on the machine hosting the container, that is a Ubuntu 22.04.1 LTS. The browser used is the same for both instances.

The issue looks similar to this issue with ipywidgets, but actually in my Jupyterhub instance ipywidgets work except for ipysheet, and the solution proposed there is to upgrade ipywidgets to 8.x.x, that doesn’t solve the problem for me (I already have ipywidgets 8.0.4).

Any ideas on how to solve this?

The full text of the error message is:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'SheetModel' from module 'ipysheet'

I found a workaround for this problem:

the ipysheet widgets work when I install ipysheet in the base environment, before creating new conda virtual environments.

So, the bottom line is: widget libraries need to be installed in the base environment otherwise they also won’t work in any other environment.