Widgetslabextension package
See original GitHub issueSorry in advance if an issue was already opened for this.
After a long discussion with @maartenbreddels yesterday we agreed that installing an interactive widgets library for JupyterLab is too complicated for users, and very error-prone. We think it might scare people off and result in giving up trying to use our extensions.
One of the issues we discussed was that when doing:
conda install ipyleaflet
jupyter labextension install jupyter-leaflet
You might get a Python package that is incompatible with the JS package, resulting in the Widget model not found
error in JupyterLab.
@maartenbreddels @mariobuikhuizen and I think @vidartf went around this specific issue in their extensions by putting a tgz
of the JS package under share/jupyter/lab/extensions
, allowing JupyterLab to find the package and rebuild itself (either from the GUI or doing jupyter lab build
).
This ensures having a version of the JS package compatible with the Python package. One would argue it makes the Python package dependent on the JS package, and I would agree it’s not a good thing, but usability would be improved.
I would like to propose doing the same thing in ipywidgets, with a new widgetslabextension
package (widgetsnbextension
counterpart) which installs the tgz
at the right place.
The only thing I am not sure about is how this package would be installed. Should it be a JupyterLab dependency? An ipywidgets dependency? Should the user install it manually?
I can come up with a PR myself if nobody is against it.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:40 (39 by maintainers)
Actually, I do like
jupyter_widgets
, in that the “ipy” is specific to the python kernel, but thejupyter_widgets
package is only for frontends, and is agnostic about the kernel language, etc.I don’t think I fully grasp the nuance of the dependency resolution problems but given:
is there any possibility of
jupyterlab-manager
being included in jupyterlab itself? This seems like it would automatically would keep the frontend versions in sync.Big 👍 to anything the removes the need to run
jupyter labextension install @jupyter-widgets/jupyterlab-manager
as this can be very confusing. For example here are some quotes from a colleague I was helping to get interactive plot working today:Related to the first quote is there any way to raise an error in python when the widget versions don’t match or jupyterlab-manager is not present? The failure state of mismatched javascript version or equivalent can be very opaque especially if someone doesn’t know about the webdev console.