kreshuklab / plant-seg

A tool for cell instance aware segmentation in densely packed 3D volumetric images
https://kreshuklab.github.io/plant-seg/
MIT License
91 stars 31 forks source link

GL ES 2.0 error #309

Open z-lumley opened 1 week ago

z-lumley commented 1 week ago

Hi, I have installed PlantSeg using the instructions.

I ran into the same problem as adkrishnan in issue #274 and used their solution to install bioimageio.core

That solved that issue, however when attempting to run plantseg --napari or plantseg --gui I get the following error:

plantseg --napari
You are using the latest version of PlantSeg: 1.8.1.
WARNING: Could not load OpenGL library.
Traceback (most recent call last):
  File "/home/zac/micromamba/envs/plant-seg/bin/plantseg", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/plantseg/run_plantseg.py", line 79, in main
    launch_napari()
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/plantseg/run_plantseg.py", line 30, in launch_napari
    from plantseg.viewer.viewer import run_viewer
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/plantseg/viewer/viewer.py", line 3, in <module>
    from plantseg.viewer.containers import get_proofreading
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/plantseg/viewer/containers.py", line 6, in <module>
    from plantseg.viewer.widget.dataprocessing import widget_cropping, widget_merge_layers
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/plantseg/viewer/widget/dataprocessing.py", line 9, in <module>
    from napari.layers import Image, Labels, Shapes, Layer
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/layers/__init__.py", line 10, in <module>
    from napari.layers.base import Layer
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/layers/base/__init__.py", line 1, in <module>
    from napari.layers.base._base_constants import ActionType
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/layers/base/_base_constants.py", line 4, in <module>
    from napari.utils.misc import StringEnum
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/utils/__init__.py", line 3, in <module>
    from napari.utils.colormaps.colormap import (
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/utils/colormaps/__init__.py", line 2, in <module>
    from napari.utils.colormaps.colormap import (
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/utils/colormaps/colormap.py", line 19, in <module>
    from napari.utils.color import ColorArray
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/utils/color.py", line 8, in <module>
    from napari.utils.colormaps.standardize_color import transform_color
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/napari/utils/colormaps/standardize_color.py", line 28, in <module>
    from vispy.color import ColorArray, get_color_dict, get_color_names
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/vispy/color/__init__.py", line 12, in <module>
    from .colormap import (Colormap, BaseColormap,  # noqa
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/vispy/color/colormap.py", line 14, in <module>
    import vispy.gloo
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/vispy/gloo/__init__.py", line 47, in <module>
    from . import gl  # noqa
    ^^^^^^^^^^^^^^^^
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/vispy/gloo/gl/__init__.py", line 230, in <module>
    from . import es2 as default_backend  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zac/micromamba/envs/plant-seg/lib/python3.12/site-packages/vispy/gloo/gl/es2.py", line 48, in <module>
    raise OSError('GL ES 2.0 library not found')
OSError: GL ES 2.0 library not found

Any advice or suggestions would be appreciated!

qin-yu commented 1 week ago

Hi @z-lumley thanks for reporting. Are you using a Mac?

z-lumley commented 6 days ago

Hi @qin-yu, I'm using Ubuntu 22.04 through WSL

qin-yu commented 6 days ago

I reviewed your issue again. It seems that during Napari's import of Layer, vispy throws an error saying GL ES 2.0 library not found. This is very unlikely to be a PlantSeg issue. If you followed the recommended installation step, conda or mamba should have installed the dependencies correctly unless there are bugs in some packages of specific versions.

@lorenzocerrone am I right?