Skip to content

ipympl does not work in JupyterLite #334

@martinRenou

Description

@martinRenou

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions