-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgets don't display on jupyterlab 4 / jupyter notebook 7 #3968
Comments
Similar behavior on fresh install jupyter lab 4.3.4, ipwidgets 8.1.5. Code example from ipwidgets: import ipywidgets as widgets
slider = widgets.IntSlider( value=7, min=0, max=10, step=1, description='Test:' )
slider Result is text only, no widget rendered:
Same result:
System info
Environment
|
@BwandoWando : Apologies if I confused the issue, as the use cases are somewhat distinct. However the underlying behavior seems the same as reported by @mattragoza. If there is any clarification I can provide to progress toward resolution, please don't hesitate. Thank you. |
I currently am not able to get interactive figures with matplotlib and ipympl, even in old notebooks in which it worked (using I believe this might be related to this issue? Package versions:
|
Just tried to update to jupyterlab 4.4.0a2, seems to be fixed in this pre-release version, at least for ipympl. |
Also tried upgrade to jupyterlab 4.4.0a2, same result. No widgets rendered. Moved back to 4.3.4 |
This is perhaps related to Java script. Testing Java Script at the debug console seems fine. For example in the debugger console: alert('Alert') pops up the box: This cell runs fine: import ipywidgets as widgets
from IPython.display import display When execute this in following cell: w = widgets.IntSlider() The browser inspect shows:
Which is this code in default.js /**
* Handle a `comm_open` kernel message.
*/
async _handleCommOpen(msg) {
this._assertCurrentMessage(msg);
const content = msg.content;
const comm = new comm_1.CommHandler(content.target_name, content.comm_id, this, () => {
this._unregisterComm(content.comm_id);
});
this._comms.set(content.comm_id, comm);
try {
const target = await Private.loadObject(content.target_name, content.target_module, this._targetRegistry);
await target(comm, msg);
}
catch (e) {
// Close the comm asynchronously. We cannot block message processing on
// kernel messages to wait for another kernel message.
comm.close();
console.error('Exception opening new comm');
throw e;
}
} This is as far as I can get. Any suggestions for progress appreciated. Installed :
|
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:
Then I go to the OnDemand portal and launch a jupyter lab job, and I run the following:
I see the text "Loading widget..." below the cell, with nothing else displayed.
Expected behavior
I expect to see an interactive Button widget.
Context
Command Line Output
Browser Output
If using JupyterLab
Installed Labextensions
The text was updated successfully, but these errors were encountered: