Attempting to import HAPI2 in a virtual environment results in a numpy error.
Error message:
AttributeError: module 'numpy' has no attribute 'complex'.
np.complex was a deprecated alias for the builtin complex. To avoid this error in existing code, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Steps to produce error:
- Install hapi2 according to ReadMe inside the virtual environment.
- In ipython, type
from hapi2 import *
Full Traceback:

Attempting to import HAPI2 in a virtual environment results in a numpy error.
Error message:
AttributeError: module 'numpy' has no attribute 'complex'.
np.complexwas a deprecated alias for the builtincomplex. To avoid this error in existing code, usecomplexby itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.complex128here.The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Steps to produce error:
from hapi2 import *Full Traceback:
