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

Numpy compatibility issue #974

Open
Midnighter opened this issue Aug 4, 2024 · 4 comments · May be fixed by #975
Open

Numpy compatibility issue #974

Midnighter opened this issue Aug 4, 2024 · 4 comments · May be fixed by #975

Comments

@Midnighter
Copy link
Contributor

When I install biom-format and numpy >= 2 in an environment, I get a lot of errors of the sort:

ValueError('numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject')

That is even though, version 2.1.16 promises numpy 2.0 compatibility.

I think, the reason is that you do not restrict the numpy version in your build instructions and your wheels are compiled against numpy <2.

[build-system]
requires = ["setuptools","wheel", "numpy", "cython"]
@wasade
Copy link
Member

wasade commented Aug 4, 2024 via email

@Midnighter
Copy link
Contributor Author

I can, but the nasty side-effect of that will be loss of compatibility with numpy <2. Is that what the project wants?

@wasade
Copy link
Member

wasade commented Aug 4, 2024 via email

@iBuitron
Copy link

iBuitron commented Aug 7, 2024

same here but when installing with poetry:

  File "/home/reveur/python/environmental/quickBio/ed.py", line 1, in <module>
    import biom
  File "/home/reveur/python/environmental/quickBio/.venv/lib/python3.11/site-packages/biom/__init__.py", line 51, in <module>
    from .table import Table
  File "/home/reveur/python/environmental/quickBio/.venv/lib/python3.11/site-packages/biom/table.py", line 196, in <module>
    from ._filter import _filter
  File "biom/_filter.pyx", line 1, in init biom._filter
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

(this installation comming from scikit-bio using poetry)

NOTE: if i installing with pip, it works fine.

Report on Scikit-bio forum: scikit-bio/scikit-bio#2101

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 a pull request may close this issue.

3 participants