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

CI fails when numpy 2.0.0 is installed #4619

Closed
orbeckst opened this issue Jun 18, 2024 · 3 comments
Closed

CI fails when numpy 2.0.0 is installed #4619

orbeckst opened this issue Jun 18, 2024 · 3 comments

Comments

@orbeckst
Copy link
Member

Expected behavior

CI passes with correct code.

Actual behavior

Azure CI runners such as https://dev.azure.com/mdanalysis/mdanalysis/_build/results?buildId=7066&view=logs&jobId=86224841-1158-5011-fbb7-7c2644c2081b&j=86224841-1158-5011-fbb7-7c2644c2081b&t=44ce4b91-ecdc-5aca-e807-60d46710cf6d in #4162 (comment) fail with

=================================== ERRORS ====================================
__________________ ERROR collecting MDAnalysisTests/analysis __________________
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    from .lib import log
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\MDAnalysis\lib\__init__.py:34: in <module>
    from . import transformations
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\MDAnalysis\lib\transformations.py:172: in <module>
    from .mdamath import angle as vecangle
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\MDAnalysis\lib\mdamath.py:63: in <module>
    from . import util
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\MDAnalysis\lib\util.py:228: in <module>
    from ._cutil import unique_int_1d
MDAnalysis\\lib\\_cutil.pyx:1: in init MDAnalysis.lib._cutil
    ???
E   ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

The action installed numpy 2.0.0 via pip.

@orbeckst
Copy link
Member Author

@tylerjereddy @IAlibay any ideas what's happening and how to fix it?

tylerjereddy added a commit to tylerjereddy/mdanalysis that referenced this issue Jun 18, 2024
* Fixes MDAnalysis#4619

* We should build against NumPy `2.0.0` so that we're backwards
compatible to NumPy `1.x` while still supporting 2.x series. This
is simpler to maintain as well. In theory, should support
as far back as NumPy `1.19` if we needed it.
@tylerjereddy
Copy link
Member

Pretty sure pyproject.toml needs an update so we don't build wheels (against NumPy 1.x) that are binary incompatible against the NumPy 2.x series. I opened the cross-listed PR. As @rgommers indicated, we should try to get a 2.x compatible release out soon-ish too.

@tylerjereddy
Copy link
Member

it looks like some of our Windows deps may not have NumPy 2 compatible releases yet as well

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

No branches or pull requests

2 participants