Description
Description
I am trying to create interactive plots in jupyter notebook in a remote computing environment, which I am accessing through OnDemand. The system recently updated to notebook version 7, which to my understanding is effectively based on jupyter lab version 4 and no longer support notebook extensions, so my interactive plotting with %matplotlib notebook no longer works. I first tried %matplotlib ipympl, but a simple test plot only displays "Loading widget..." with no other output. Then I tried %matplotlib widget, with the same result. Importing ipywidgets and showing a simple widget gives me the same result too, which leads me to believe it is a problem with my ipywidgets install.
Reproduce
I ssh into the remote cluster and create a clean environment, then register it as an ipython kernel:
mamba env create -n test jupyterlab ipympl ipywidgets ipykernel
mamba activate test
python -m ipykernel install --user --name test
Then I go to the OnDemand portal and launch a jupyter lab job, and I run the following:
from ipywidgets import Button;
Button(description='test')
I see the text "Loading widget..." below the cell, with nothing else displayed.
Expected behavior
I expect to see an interactive Button widget.
Context
- ipywidgets version
Selected Jupyter core packages...
IPython : 8.30.0
ipykernel : 6.29.5
ipywidgets : 8.1.5
jupyter_client : 8.6.3
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.3.3
nbclient : 0.10.1
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : not installed
qtconsole : not installed
traitlets : 5.14.3
- Operating System and version:
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.10 (Ootpa)
Release: 8.10
Codename: Ootpa
- Browser and version: Google Chrome Version 131.0.6778.140 (Official Build) (64-bit)
Command Line Output
I do not know how to access the command line output since I am launching the job through an OnDemand portal.
Browser Output
Error: Could not create a model. at 272.2a8425db7209008188fc.js:1:2113 at async _handleCommOpen (523.fa256ee012d38a89b65a.js:1:2798) at async b._handleCommOpen (jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1:1372268) at async b._handleMessage (jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1:1374264) (anonymous) @ 272.2a8425db7209008188fc.js:1 Promise.catch e.handle_comm_open @ 272.2a8425db7209008188fc.js:1 _handleCommOpen @ 523.fa256ee012d38a89b65a.js:1 _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Exception opening new comm _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI 272.2a8425db7209008188fc.js:1 Could not instantiate widget (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 l @ 272.2a8425db7209008188fc.js:1 Promise.then a @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 S @ 272.2a8425db7209008188fc.js:1 e._make_model @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 S @ 272.2a8425db7209008188fc.js:1 e.new_model @ 272.2a8425db7209008188fc.js:1 e.handle_comm_open @ 272.2a8425db7209008188fc.js:1 _handleCommOpen @ 523.fa256ee012d38a89b65a.js:1 _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI 272.2a8425db7209008188fc.js:1 Error: Could not create a model. at 272.2a8425db7209008188fc.js:1:2113 at async _handleCommOpen (523.fa256ee012d38a89b65a.js:1:2798) at async b._handleCommOpen (jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1:1372268) at async b._handleMessage (jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1:1374264) (anonymous) @ 272.2a8425db7209008188fc.js:1 Promise.catch e.handle_comm_open @ 272.2a8425db7209008188fc.js:1 _handleCommOpen @ 523.fa256ee012d38a89b65a.js:1 _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Exception opening new comm _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI 2523.fa256ee012d38a89b65a.js:1 Uncaught (in promise) Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module at x.loadClass (523.fa256ee012d38a89b65a.js:1:6638) at x.<anonymous> (272.2a8425db7209008188fc.js:1:9277) at 272.2a8425db7209008188fc.js:1:5989 at Object.next (272.2a8425db7209008188fc.js:1:6094) at 272.2a8425db7209008188fc.js:1:5030 at new Promise (<anonymous>) at S (272.2a8425db7209008188fc.js:1:4775) at e._make_model (272.2a8425db7209008188fc.js:1:9156) at x.<anonymous> (272.2a8425db7209008188fc.js:1:9010) at 272.2a8425db7209008188fc.js:1:5989 loadClass @ 523.fa256ee012d38a89b65a.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 S @ 272.2a8425db7209008188fc.js:1 e._make_model @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 (anonymous) @ 272.2a8425db7209008188fc.js:1 S @ 272.2a8425db7209008188fc.js:1 e.new_model @ 272.2a8425db7209008188fc.js:1 e.handle_comm_open @ 272.2a8425db7209008188fc.js:1 _handleCommOpen @ 523.fa256ee012d38a89b65a.js:1 _handleCommOpen @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleCommOpen _handleMessage @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 await in _handleMessage (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1 Promise.then (anonymous) @ jlab_core.d25e823c058f4ae79a91.js?v=d25e823c058f4ae79a91:1Understand this errorAI 4523.fa256ee012d38a89b65a.js:1 Uncaught (in promise) Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module at x.loadClass (523.fa256ee012d38a89b65a.js:1:6638) at x.<anonymous> (272.2a8425db7209008188fc.js:1:9277) at 272.2a8425db7209008188fc.js:1:5989 at Object.next (272.2a8425db7209008188fc.js:1:6094) at 272.2a8425db7209008188fc.js:1:5030 at new Promise (<anonymous>) at S (272.2a8425db7209008188fc.js:1:4775) at e._make_model (272.2a8425db7209008188fc.js:1:9156) at x.<anonymous> (272.2a8425db7209008188fc.js:1:9010) at 272.2a8425db7209008188fc.js:1:5989
If using JupyterLab
- JupyterLab version: 4.2.5
Installed Labextensions
JupyterLab v4.3.3
/ocean/projects/asc170022p/mtragoza/mambaforge/envs/test/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
jupyter-matplotlib v0.11.4 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)