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.

installing ipywidgets for kernel-only

See original GitHub issue

ipywidgets currently depends on widgetsnbextension, which in turn depends on notebook. This means installing ipywidgets into a kernel-only env requires pulling in the notebook and all of its dependencies, which will be unused. This dramatically increases what’s required for installing Python 3 notebook + a Python 2 kernel, for instance (what I’m working on right now).

Since ipywidgets does not in fact require widgetsnbextension, this is an artificial dependency. But I recognize that it’s solving the single-command install case, which is more important than saving space. Still, it would be nice to have an answer for installing just ipywidgets in a kernel env, which right now appears to be impossible.

One option would be to remove widgetsnbextension’s explicit dependency on notebook. Lots of people are going to install ipywidgets and expect the functionality of widgetsnbextension to be available. However, it is exceedingly rare that widgetsnbextension will be installed without notebook also being explicitly installed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
maartenbreddelscommented, Jan 18, 2018

I think this is also a good topic for next week’s workshop.

0reactions
jasongroutcommented, Jul 8, 2022

An update: in ipywidgets 8.0, ipywidgets depends on widgetsnbextension and jupyterlab_widgets, but widgetsnbextension no longer depends on notebook. Thus installing ipywidgets in a kernel will install some unused js packages for notebook and jlab, but not pull in other dependencies like notebook.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Jupyter Widgets 7.6.5 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 >
jupyter kernels
Jupyter KernelsIt seemed to install correctly both times. The Jupyter Notebook integrates code and its output into the single document that combines ...
Read more >
ipywidgets · PyPI
ipywidgets, also known as jupyter-widgets or simply widgets, are interactive HTML widgets for Jupyter notebooks and the IPython kernel.
Read more >
Using IPyWidgets (UI Controls for the Jupyter Notebook) |
If you don't have ipywidgets in your installation run : pip install ipywidgets ... https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html ...
Read more >
Installing widgets | Learning Jupyter - Packt Subscription
The widgets package is an upgrade to the standard Jupyter installation. You can update the widgets package using this command: pip install ipywidgets...
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