ipympl
ipympl copied to clipboard
ipympl does not work in JupyterLite
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!
Once this is fixed, we should remove the ugly workaround #381