-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot import on a headless system #12
Comments
HI @thawn , this bug should be fixed in the recent release of nsbatwm. Can you check? If not, please let me know how I can reproduce the issue. Thanks! |
The error appers to still exist. Code:
Error:
|
napari-tools-menu is version 0.1.17 |
the error still exists. |
Hi @thawn , make sure you have the recent version installed. Your Google Colab notebook does not contain any With the current version of nsbatwm it works (in colab). Try it out like this:
Let me know if the issue persists! Best, |
Hi @haesleinhuepf, I manually added the pip install command to the notebook I sent you. |
Maybe try
|
@haesleinhuepf I am trying to run the nsbatwm (0.3.6) based segmentation workflow on TUD's cluster and the package still seems to have an OpenGL dependency which prevents it from running. |
Hi @somas193 , can you please post the error message here and the list of installed packages; in particular those which are mentioned in the error message. Thanks! |
|
Just FYI: I'm working on this here: haesleinhuepf/napari-time-slicer#12 But the tests fail, ... it may take some time to fix this... |
Ok, I managed @somas193 . Would you mind trying to install |
The same error still pops up @haesleinhuepf! I'll later reproduce the issue in a jupyter notebook which would be a lot easier to share and test. However, I've made it work for now by installing OpenGL in the Singularity container. Our Singularity container uses: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.3.1/ubuntu2004/base/Dockerfile as a base and I added the lines |
importing
napari_segment_blobs_and_things_with_membranes
on a headless system (the TUD cluster)fails with errors about missing GL libraries. I assume this means that this plugin needs a working display?
is there a workaround to make theis plugins work without gl support?
Cheers,
Till
`napari_segment_blobs_and_things_with_membranes` import errors
---------------------------------------------------------------------------OSError Traceback (most recent call last)
Input In [5], in <cell line: 6>()
4 import matplotlib.pyplot as plt
5 import numpy as np
----> 6 import napari_segment_blobs_and_things_with_membranes as nsbatwm
File /app/env/lib/python3.9/site-packages/napari_segment_blobs_and_things_with_membranes/init.py:5, in
2 version = "0.3.1"
3 common_alias = "nsbatwm"
----> 5 from napari.types import ImageData, LabelsData
7 from napari_plugin_engine import napari_hook_implementation
9 import numpy as np
File /app/env/lib/python3.9/site-packages/napari/types.py:186, in
176 if sys.version_info >= (3, 9):
177 register_type(
178 Future[data_type], # type: ignore
179 choices=_mgui.get_layers_data,
(...)
182 ),
183 )
--> 186 _register_types_with_magicgui()
File /app/env/lib/python3.9/site-packages/napari/types.py:157, in _register_types_with_magicgui()
153 from concurrent.futures import Future
155 from magicgui import register_type
--> 157 from . import layers
158 from .utils import _magicgui as _mgui
160 for _type in (LayerDataTuple, List[LayerDataTuple]):
File :1055, in handle_fromlist(module, fromlist, import, recursive)
File /app/env/lib/python3.9/site-packages/napari/_lazy.py:45, in install_lazy..getattr(name)
42 from scipy import stats # noqa: F401
44 if name in submodules:
---> 45 return import_module(f'{module_name}.{name}')
46 elif name in attr_to_modules:
47 submod = import_module(f'{module_name}.{attr_to_modules[name]}')
File /app/env/lib/python3.9/importlib/init.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File /app/env/lib/python3.9/site-packages/napari/layers/init.py:11, in
8 from importlib import import_module as _imp
10 from ..utils.misc import all_subclasses as _all_subcls
---> 11 from .base import Layer
12 from .image import Image
13 from .labels import Labels
File /app/env/lib/python3.9/site-packages/napari/layers/base/init.py:1, in
----> 1 from .base import Layer, no_op
File /app/env/lib/python3.9/site-packages/napari/layers/base/base.py:15, in
12 import numpy as np
14 from ...utils._dask_utils import configure_dask
---> 15 from ...utils._magicgui import add_layer_to_viewer, get_layers
16 from ...utils.events import EmitterGroup, Event
17 from ...utils.events.event import WarningEmitter
File /app/env/lib/python3.9/site-packages/napari/utils/init.py:2, in
1 from ._dask_utils import resize_dask_cache
----> 2 from .colormaps import Colormap
3 from .info import citation_text, sys_info
4 from .notebook_display import nbscreenshot
File /app/env/lib/python3.9/site-packages/napari/utils/colormaps/init.py:2, in
1 from .colorbars import make_colorbar
----> 2 from .colormap import Colormap
3 from .colormap_utils import (
4 ALL_COLORMAPS,
5 AVAILABLE_COLORMAPS,
(...)
16 matplotlib_colormaps,
17 )
File /app/env/lib/python3.9/site-packages/napari/utils/colormaps/colormap.py:11, in
9 from ..translations import trans
10 from .colorbars import make_colorbar
---> 11 from .standardize_color import transform_color
14 class ColormapInterpolationMode(str, Enum):
15 """INTERPOLATION: Interpolation mode for colormaps.
16
17 Selects an interpolation mode for the colormap.
(...)
21 bin between by neighboring controls points.
22 """
File /app/env/lib/python3.9/site-packages/napari/utils/colormaps/standardize_color.py:27, in
24 from typing import Any, Callable, Dict, Sequence
26 import numpy as np
---> 27 from vispy.color import ColorArray, get_color_dict, get_color_names
28 from vispy.color.color_array import _string_to_rgb
30 from ..translations import trans
File /app/env/lib/python3.9/site-packages/vispy/color/init.py:12, in
10 from ._color_dict import get_color_names, get_color_dict # noqa
11 from .color_array import Color, ColorArray
---> 12 from .colormap import (Colormap, BaseColormap, # noqa
13 get_colormap, get_colormaps) # noqa
15 all = ['Color', 'ColorArray', 'Colormap', 'BaseColormap',
16 'get_colormap', 'get_colormaps',
17 'get_color_names', 'get_color_dict']
File /app/env/lib/python3.9/site-packages/vispy/color/colormap.py:14, in
12 from hsluv import hsluv_to_rgb
13 from ..util.check_environment import has_matplotlib
---> 14 import vispy.gloo
16 ###############################################################################
17 # Color maps
18
19 # Length of the texture map used for luminance to RGBA conversion
20 LUT_len = 1024
File /app/env/lib/python3.9/site-packages/vispy/gloo/init.py:47, in
5 """
6 Object oriented interface to OpenGL.
7
(...)
42
43 """
45 from future import division
---> 47 from . import gl # noqa
48 from .wrappers import * # noqa
49 from .context import (GLContext, get_default_config, # noqa
50 get_current_canvas) # noqa
File /app/env/lib/python3.9/site-packages/vispy/gloo/gl/init.py:230, in
228 from . import gl2 as default_backend # noqa
229 if default_backend._lib is None: # Probably Android or RPi
--> 230 from . import es2 as default_backend # noqa
233 # Call use to start using our default backend
234 use_gl()
File /app/env/lib/python3.9/site-packages/vispy/gloo/gl/es2.py:48, in
46 # Else, we failed and exit
47 if es2_file is None:
---> 48 raise OSError('GL ES 2.0 library not found')
49 # Load it
50 _lib = ctypes.CDLL(es2_file)
OSError: GL ES 2.0 library not found
The text was updated successfully, but these errors were encountered: