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.

Enabling widgets on jupyterhub for all users

See original GitHub issue

Hi,

I am running jupyterhub with default local spawner installed via conda (system-wide installation). Jupyterhub is installed in its own coda-environment which also includes the single-user notebook. I provide another system environment to all users called py36-sys. I installed the ipywidgets package from conda-forge in the py36-sys environment. Still, users get an error when trying to use the widgets.

I also tried to run this command after activating the py36-sys environment:

jupyter nbextension enable --py widgetsnbextension --sys-prefix

but the error persists.

Test code:

from ipywidgets import interact

@interact(x=(0, 100, 10))
def p(x=50):
    pass

Output

Failed to display Jupyter Widget of type `interactive`.

If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean that the widgets JavaScript is still loading. If this message persists, it likely means that the widgets JavaScript library is either not installed or not enabled. See the Jupyter Widgets Documentation for setup instructions.

If you're reading this message in another frontend (for example, a static rendering on GitHub or NBViewer), it may mean that your frontend doesn't currently support widgets.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tritemiocommented, Feb 2, 2018

I solved the issue by:

  1. installing ipywidgets also in the environment which holds jupyterhub (and the single-user notebook)
  2. running jupyter nbextension enable --py widgetsnbextension --sys-prefix in the jupyterhub widgets
  3. restarting jupyterhub

Only step 1 was not enough.

0reactions
AndriiHanenkocommented, Feb 6, 2020

I solved the issue by:

1. installing ipywidgets also in the environment which holds jupyterhub (and the single-user notebook)

2. running `jupyter nbextension enable --py widgetsnbextension --sys-prefix` in the jupyterhub widgets

3. restarting jupyterhub

Only step 1 was not enough.

True

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Jupyter Widgets 7.6.2 documentation
Users can install the current version of ipywidgets with pip or conda. In most cases, installing the Python ipywidgets package will also automatically...
Read more >
Using Widgets in Jupyter Notebook - YouTube
Learn how to use Jupyter Notebook's built-in widgets in this video tutorial.Read the book: https://leanpub.com/jupyternotebook101/Check out ...
Read more >
How to enable widgets in DSS internal Jupyter server?
I need to work with ipyvolume module which needs the ipywidgets. The instructions say that I need to enable the widget by running:...
Read more >
Bring your Jupyter Notebook to life with interactive widgets
Extending Jupyter's User Interface. Traditionally, every time you need to modify the output of your notebook cells, you need to change the ...
Read more >
Customizing User Environment
If you have configured prePuller.hook.enabled, all the nodes in your cluster ... JupyterLab is the new user interface for Jupyter, which is meant...
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