From 998eac331cc8b8973e9c5c62f5498463016ca91e Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 14 Feb 2024 16:20:06 +0100 Subject: [PATCH] don't fail on vispy import --- src/tyssue/draw/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tyssue/draw/__init__.py b/src/tyssue/draw/__init__.py index de4a77c1..69d31784 100644 --- a/src/tyssue/draw/__init__.py +++ b/src/tyssue/draw/__init__.py @@ -2,7 +2,12 @@ from .ipv_draw import sheet_view as sheet_view_3d # noqa from .plt_draw import create_gif, plot_forces, quick_edge_draw # noqa from .plt_draw import sheet_view as sheet_view_2d # noqa -from .vispy_draw import sheet_view as sheet_view_vispy # noqa + +try: + from .vispy_draw import sheet_view as sheet_view_vispy # noqa +except OSError: + print("vispy won't work") + sheet_view_vispy = None def sheet_view(sheet, coords=["x", "y", "z"], ax=None, mode="2D", **draw_specs_kw):