DIAGNijmegen / pathology-whole-slide-data

A package for working with whole-slide data including a fast batch iterator that can be used to train deep learning models.
https://diagnijmegen.github.io/pathology-whole-slide-data/
Apache License 2.0
86 stars 24 forks source link

Cucim backend not available #55

Closed siemdejong closed 4 months ago

siemdejong commented 4 months ago

Loading cucim with wsd using

from wholeslidedata.image.backends import get_backend

image_backend = 'cucim'
wsd_image_backend = get_backend(image_backend)

gives the following error:

Traceback (most recent call last):
  File "/home/siemdejong/miniforge3/envs/pathology/lib/python3.11/site-packages/wholeslidedata/image/backends.py", line 31, in get_backend
    return getattr(import_module(module), attribute)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/siemdejong/miniforge3/envs/pathology/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/siemdejong/miniforge3/envs/pathology/lib/python3.11/site-packages/wholeslidedata/interoperability/cucim/backend.py", line 7, in <module>
    class _MixedMeta(type(WholeSlideImageBackend), type(CuImage)):
TypeError: Cannot create a consistent method resolution
order (MRO) for bases type, pybind11_type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/siemdejong/miniforge3/envs/pathology/lib/python3.11/site-packages/wholeslidedata/image/backends.py", line 33, in get_backend
    raise BackendNotAvailableError(backend)
wholeslidedata.image.backends.BackendNotAvailableError: cucim

Using python 3.11.7.