numcodecs icon indicating copy to clipboard operation
numcodecs copied to clipboard

cannot import name 'cbuffer_sizes' from 'numcodecs.blosc'

Open aamster opened this issue 9 months ago • 3 comments

Hi,

It looks like the latest released version 0.16.0 is not compatible with zarr < 3. It gives me

/usr/share/miniconda/envs/ome_zarr_converter/lib/python3.11/site-packages/zarr/util.py:34: in <module>
    from numcodecs.blosc import cbuffer_sizes, cbuffer_metainfo
E   ImportError: cannot import name 'cbuffer_sizes' from 'numcodecs.blosc' (/usr/share/miniconda/envs/ome_zarr_converter/lib/python3.11/site-packages/numcodecs/blosc.cpython-311-x86_64-linux-gnu.so)

Thanks!

aamster avatar Apr 07 '25 15:04 aamster

I run into this in https://github.com/pipefunc/pipefunc as well.

Pinning to <0.16 seems to fix it.

basnijholt avatar Apr 07 '25 19:04 basnijholt

This is likely due to removal of deprecated functions in PR: https://github.com/zarr-developers/numcodecs/pull/712

Looks like Zarr still needs an update to drop these names: https://github.com/zarr-developers/zarr-python/issues/2963

jakirkham avatar Apr 07 '25 23:04 jakirkham

Solution #733

LCGaoZzz avatar Apr 08 '25 06:04 LCGaoZzz