installing ipywidgets for kernel-only
See original GitHub issueipywidgets 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:
- Created 6 years ago
- Reactions:4
- Comments:13 (13 by maintainers)
Top GitHub Comments
I think this is also a good topic for next week’s workshop.
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.