Skip to content

ipympl does not work in JupyterLite #334

Open

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!

Activity

  1. martinRenou commented on Oct 19, 2021

    @martinRenou
    MemberAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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