ipympl icon indicating copy to clipboard operation
ipympl copied to clipboard

ipympl does not work in JupyterLite

Open martinRenou opened this issue 3 years ago • 1 comments

Describe the issue

Due to a dependency on tornado https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L22, ipympl does not work in JupyterLite

We might be able to implement a custom Timer https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L118 based entirely on asyncio (which works on JupyterLite).

Workaround

As a workaround, one could do

import sys
import types

sys.modules['tornado'] = types.ModuleType('tornadofake')

Disclaimer, I would not be held responsible for anything that would go wrong if you copy this code!

martinRenou avatar Jul 06 '21 15:07 martinRenou

Once this is fixed, we should remove the ugly workaround #381

martinRenou avatar Oct 19 '21 09:10 martinRenou