Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NickAkhmetov/Cap numpy under v2 #349

Merged
merged 2 commits into from
Jun 17, 2024
Merged

NickAkhmetov/Cap numpy under v2 #349

merged 2 commits into from
Jun 17, 2024

Conversation

NickAkhmetov
Copy link
Collaborator

numpy 2.0 released yesterday: https://numpy.org/doc/stable/reference/index.html

Since pip resolves to the latest supported version during install, this leads to a conflict with ome/skimage:

[2024-06-17 12:29:14] ERROR in hubmap_translator:835: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
[2024-06-17 12:29:14] ERROR in hubmap_translator:837: Failed to dynamically import transform module index: portal at time: 1718627354.2877655
Traceback (most recent call last):
  File "/usr/src/app/src/hubmap_translator.py", line 832, in init_transformers
    m = importlib.import_module(xform_module)
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
--
    from .ome import (
  File "/usr/local/lib/python3.9/site-packages/vitessce/data_utils/ome.py", line 3, in <module>
    from ome_zarr.writer import write_image
  File "/usr/local/lib/python3.9/site-packages/ome_zarr/writer.py", line 15, in <module>
    from .scale import Scaler
  File "/usr/local/lib/python3.9/site-packages/ome_zarr/scale.py", line 16, in <module>
    from skimage.transform import (
  File "/usr/local/lib64/python3.9/site-packages/skimage/__init__.py", line 122, in <module>
    from ._shared import geometry
  File "geometry.pyx", line 1, in init skimage._shared.geometry
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

This PR adjusts the resolved versions of numpy to avoid using this latest version until we are ready to make this upgrade.

@NickAkhmetov NickAkhmetov merged commit 5ae1dae into main Jun 17, 2024
10 checks passed
@NickAkhmetov NickAkhmetov deleted the nickakhmetov/lock-numpy branch June 17, 2024 17:34
@ilan-gold
Copy link
Collaborator

Just a heads up, we can unpin ome/ome-zarr-py@9205bd7 on the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants