Dask.array.from_zarr() error

I’ve saved a zarr using dask.array.to_zarr() with dask=2022.10.2 build pyhd8ed1ab_0

I then tried to read it on my virtual machine using dask.array.from_zarr() with dask= 2024.8.2 build py312h06a4308_0.

I get the following error:

File ~/anaconda3/envs/ct-env/lib/python3.12/site-packages/dask/array/core.py:3625, in from_zarr(url, component, storage_options, chunks, name, inline_array, **kwargs) 3622
import zarr 3624
storage_options = storage_options or {} → 3625
if isinstance(url, zarr.Array): 3626
z = url 3627
elif isinstance(url, (str, os.PathLike)):
AttributeError: module ‘zarr’ has no attribute ‘Array’

Apparently I needed to install and import the zarr module, in addition to dask. When I did that it worked.

Installing zarr is indeed required, importing it should not.

That seems true.

Maybe the error information would be more useful if it suggested to install the zarr package.