question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Widgetslabextension package

See original GitHub issue

Sorry 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:40 (39 by maintainers)

github_iconTop GitHub Comments

2reactions
jasongroutcommented, Mar 4, 2020

Actually, I do like jupyter_widgets, in that the “ipy” is specific to the python kernel, but the jupyter_widgets package is only for frontends, and is agnostic about the kernel language, etc.

1reaction
ianhicommented, Jul 13, 2020

I don’t think I fully grasp the nuance of the dependency resolution problems but given:

One mismatch here is that the right frontend things to be installed depends on the frontend, not on the kernel-side ipywidgets

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:

why don’t i get an error message then?

your mystifying incantation works

why does jupyter notebook support this out of the box? and not jupyterlab

i might need to be the Luddite who sticks with notebooks

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

widgetsnbextension - PyPI
This package makes Jupyter widgets available in the classic Jupyter Notebook. This package provides the necessary JavaScript controls in the Jupyter ...
Read more >
Installation — Jupyter Widgets 7.7.2 documentation
Install the widgetsnbextension package in the environment containing the Jupyter Notebook server. Install ipywidgets in each kernel's environment that will use ...
Read more >
Widgetsnbextension - :: Anaconda.org
Info: This package contains files in non-standard labels. linux-ppc64le v3.6.0 ... conda install -c "conda-forge/label/broken" widgetsnbextension
Read more >
conda-forge/widgetsnbextension-feedstock - GitHub
conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda- ......
Read more >
Details of package python3-widgetsnbextension in bionic
Interactive widgets - Jupyter notebook extension (Python 3)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found