Running marimo with the 3d image viewer napari?
Hi there!
I was thinking of running marimo with napari.
In a classic notebook in VS Code, I can simply run
and it opens the viewer for me (screenshot 1)
When I run the same notebook in marimo, I don't get any error, but the window does not pop up. Interestingly though, the napari viewer icon pops at the right side of the screen (and I also get this jumping icon animation), but when I click it, nothing happens (screenshot2). I'm on a MacBook Air M3.
4 Replies
@Myles Scolnick , @Akshay : I've just reached out to the napari community, and they pointed me to this link explaining their qt event loop https://napari.org/stable/guides/event_loop.html#in-ipython-or-jupyter-notebook
I don't know too much about qt event loops, but maybe you can figure out how to incorperate the event loop with marimo. Would be really fun to use the 3D image viewer napari without callbacks! 🙂
and another observation:
opens the viewer successfully, but also it blocks marimo execution until I close the napari window.
Mm interesting — I wasn’t aware that IPython had a gui event loop. I wonder if we can hook into it somehow or otherwise reimplement its API.
@Jan-Hendrik Müller , I've created a GitHub issue to track this: https://github.com/marimo-team/marimo/issues/1986
I don't plan on adding support for the GUI event loop very soon, just because of other priorities, but I certainly see why it's important.
GitHub
GUI Event Loop integration · Issue #1986 · marimo-team/marimo
Description GUI libraries such as napari rely on IPython's opt-in integration with GUI event loops to render and respond to user interactions. We currently have no support for integrating with ...