ome / ome2024-ngff-challenge

Project planning and material repository for the 2024 challenge to generate 1 PB of OME-Zarr data
https://pypi.org/project/ome2024-ngff-challenge/
BSD 3-Clause "New" or "Revised" License
11 stars 8 forks source link

ModuleNotFoundError: No module named 'zarr.buffer' #40

Closed JThoennissen closed 2 weeks ago

JThoennissen commented 2 weeks ago

Hey there 👋

I just tried to use the ome2024-ngff-challenge tool but I encountered an issue. I ran the following:

python3.11 -m venv venv
source venv/bin/activate
pip install ome2024-ngff-challenge
ome2024-ngff-challenge --help

This gave me the following error:

File "/home/jthoennissen/venv/bin/ome2024-ngff-challenge", line 5, in <module>
    from ome2024_ngff_challenge import dispatch
  File "/home/jthoennissen/venv/lib/python3.11/site-packages/ome2024_ngff_challenge/__init__.py", line 12, in <module>
    from .lookup import cli as lookup_cli
  File "/home/jthoennissen/venv/lib/python3.11/site-packages/ome2024_ngff_challenge/lookup.py", line 8, in <module>
    from .utils import configure_logging
  File "/home/jthoennissen/venv/lib/python3.11/site-packages/ome2024_ngff_challenge/utils.py", line 17, in <module>
    from zarr.buffer import Buffer, BufferPrototype
ModuleNotFoundError: No module named 'zarr.buffer'

OS: Ubuntu 20.04.6 LTS Python version: Python 3.11.9

will-moore commented 2 weeks ago

Can you check what version of zarr you have installed?

$ pip freeze | grep zarr
zarr==3.0.0a0

is what's expected based on https://github.com/ome/ome2024-ngff-challenge/blob/d25e1246b900b594c32c8214a0cb6390960fabbb/pyproject.toml#L36

d-v-b commented 2 weeks ago

it's possible that this arises because of the latest zarr-python v3 alpha release from a few days ago: https://github.com/zarr-developers/zarr-python/releases/tag/v3.0.0-alpha.1

I think this project should pin the zarr-python version exactly until the zarr-python API settles down

JThoennissen commented 2 weeks ago

Yep, I have 3.0.0a1

$ pip freeze | grep zarr
zarr==3.0.0a1

I changed to 3.0.0a0 now which fixes the issue. Thanks!

will-moore commented 2 weeks ago

Thanks @d-v-b - I'll do that now... Ah - @joshmoore got there first 👍