matplotlib / ipympl

Matplotlib Jupyter Integration
https://matplotlib.org/ipympl/
BSD 3-Clause "New" or "Revised" License
1.59k stars 226 forks source link

"Error displaying widget" with jupyterlab on the littlest jupyterhub #124

Open quantiota opened 5 years ago

quantiota commented 5 years ago

On the littlest jupyterhub environment

The example works fine on jupyterhub but I have the message "Error displaying widget" with jupyterlab

Jupyterlab 0.35.6 ipympl 0.3.3 Matplotlib 3.1.0 Jupyter-matplotlib 0.4.2

martinRenou commented 5 years ago

Could you try installing JupyterLab 1.0 instead? And make sure you use the last ipywidgets release?

quantiota commented 5 years ago

Not possible because jupyterlab is shipped with tljh and at this time there is no update version.

quantiota commented 5 years ago

On the tab nbextension I can see that

jupyter-matplotlib/extension jupyter-js-widgets/extension plotlywidget/extension

Are not compatible with tljh environment

"This nbextension is enabled in the notebook json config, but doesn't provide a yaml file to tell us how to configure it. You can still enable or disable it from here, though"

neoblizz commented 5 years ago

I am using jupyterlab 1.0.2 with the same error, I was following this example: https://stackoverflow.com/a/38865534/5729690

nibheis commented 5 years ago

Hi there,

I just spent one complete afternoon trying various versions of modules ipywidgets and ipympl + lab extensions (jupyterlab-manager and jupyter-matplotlib) - and rebuilding lab - with our current jupyterlab (0.35.6): the best I can get from jupyterlab is "Error displaying widget" with matplotlib widgets (ipywidgets are working fine). Both ipywidgets and matplotlib widgets works in classic NB.

(We cannot upgrade to jlab 1.0+ because git extension is not ready yet).

I am available for tracking the issue, please let me know what to report/check in order to help.

martinRenou commented 5 years ago

The only thing you can do while keeping JupyterLab<1. is use ipywidgets 7.4 and ipympl 0.2.

nibheis commented 5 years ago

Hi Martin and thanks for your reply.

That is exactly what I have now:

JupyterLab just rebuilt. ("jupyter lab build" command)

I don't exclude something messed up because of the massive trial and error session that went on yesterday. If my versions should work, what would you suggest to clean up the mess and have it working ?

nibheis commented 5 years ago

OK ; since I could not get matplotlib widgets running on jlab 0.35, I took one test server and upgraded most packages to the latest version: jupyterlab (1.0.4) ipywidgets (7.5.1) ipympl (0.3.3) jupyterlab-git (0.8.0) and I uninstalled all extensions and added them one by one, testing them along the process: jlab-hub core extension (1.0.2), jupyterlab-manager (1.0.2), matplotlib (0.4.2), jlab/git (0.8.0), plotly-extension (1.0.0), jlab-bokeh (1.0.0). Everything now works ! Quite happy with the changes I see - I'm now upgrading all servers. It's good to be back on the latest version.

I guess staying on JupyterLab<1. and ipywidgets 7.4 + ipympl 0.2 would work too.