Pyhams fails at import when Numpy 2 is installed. Tested agains several versions of Numpy on Python 3.12, Windows OS
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyhams.pyhams
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<stdin>", line 1, in <module>
File "C:\...\venv\Lib\site-packages\pyhams\pyhams.py", line 5, in <module>
import pyhams._hams as hams
Traceback (most recent call last):
File "C:\...\venv\Lib\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__
raise ImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\...\venv\Lib\site-packages\pyhams\pyhams.py", line 5, in <module>
import pyhams._hams as hams
ImportError: numpy.core.multiarray failed to import
Description
Pyhams fails at import when Numpy 2 is installed. Tested agains several versions of Numpy on Python 3.12, Windows OS
Spotted while trying to run RAFT
Steps to reproduce issue
Please provide a minimum working example (MWE) if possible
pip install pyhams. Comes with Numpy 2.2.4import pyhams.pyhamsCurrent behavior
Expected behavior
Should import properly
Code versions
List versions only if relevant