You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
numpy.f2py.compile function has been removed since NumPy 2.0.0 (https://numpy.org/doc/stable/release/2.0.0-notes.html), causing the python/Fortran test code in psychrolib to fail. The following error message is displayed when executing "pytest -v -s"
ImportError while loading conftest '/workspaces/psychrolib/tests/conftest.py'.
tests/conftest.py:26: in<module>
f2py.compile(source , modulename='psychrolib_fortran', extension='.f90')
/usr/local/lib/python3.11/site-packages/numpy/f2py/__init__.py:82: in __getattr__
raise AttributeError("module {!r} has no attribute "
E AttributeError: module 'numpy.f2py' has no attribute 'compile'
Describe the bug
numpy.f2py.compile function has been removed since NumPy 2.0.0 (https://numpy.org/doc/stable/release/2.0.0-notes.html), causing the python/Fortran test code in psychrolib to fail. The following error message is displayed when executing "pytest -v -s"
To Reproduce
Steps to reproduce the behavior:
Environment:
cffi 1.17.1
charset-normalizer 3.4.0
iniconfig 2.0.0
numpy 2.2.0
packaging 24.2
pip 24.0
pluggy 1.5.0
PsychroLib 2.5.0 /psychrolib/src/python
pycparser 2.22
pytest 8.3.4
setuptools 65.5.1
wheel 0.45.1
Additional comment
A possible workaround is to use subprocess.run to directly call f2py
Example:
The text was updated successfully, but these errors were encountered: