-
Notifications
You must be signed in to change notification settings - Fork 62
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
"AttributeError: np.float_ was removed in the NumPy 2.0 release" causing CI job failures during installation step #1440
Comments
As it turns out, it looks like this "NumPy 2.0" error was actually introduced in NumPy 1.24.0: https://stackoverflow.com/questions/74844262/how-can-i-solve-error-module-numpy-has-no-attribute-float-in-python and https://numpy.org/doc/stable/release/1.24.0-notes.html#expired-deprecations. It's still not clear to me why this is happening only now (or why I'm unable to reproduce the error locally), since the latest relevant commit in Pyomo for that line is from 4 months ago (https://github.com/Pyomo/pyomo/blame/7bbe3a7849f2511876118ba66132c6e7fd1dd344/pyomo/common/dependencies.py#L1002), and NumPy 1.24.0 is from Dec 2022 (!): https://pypi.org/project/numpy/1.24.0/. EDIT: the latest version of pandas, that also shows up in the stack trace, is 2.2.2, released in April 2024: https://pypi.org/project/pandas/2.2.2/. |
This might potentially be related to Pyomo/pyomo#3290, but really it's just based on the error message and the affected lines in |
OK, I might have figured out what's happening: As far as I understand, the Conda installation happens because of This makes sense as there is no constraint in the I don't really understand the details of why both For a short term fix, I think adding a NumPy version constraint when installing CyIpopt (e.g. |
The text was updated successfully, but these errors were encountered: