idies / pyJHTDB

Python wrapper for the Johns Hopkins turbulence database library
Apache License 2.0
100 stars 47 forks source link

Not compatible with latest NumPy due to use of `numpy.int` #41

Open petebachant opened 1 year ago

petebachant commented 1 year ago

Output of pip install pyjhtdb with NumPy 1.24.2:

Collecting pyjhtdb
  Using cached pyJHTDB-20200909.0.tar.gz (386 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/s_/hs4wzl4j51d8tj7v6_cz5s3m0000gn/T/pip-install-hzls0x9p/pyjhtdb_28744e7f6d4545caa7e7ce8cb563e52d/setup.py", line 48, in <module>
          import pyJHTDB
        File "/private/var/folders/s_/hs4wzl4j51d8tj7v6_cz5s3m0000gn/T/pip-install-hzls0x9p/pyjhtdb_28744e7f6d4545caa7e7ce8cb563e52d/pyJHTDB/__init__.py", line 103, in <module>
          from .libJHTDB import *
        File "/private/var/folders/s_/hs4wzl4j51d8tj7v6_cz5s3m0000gn/T/pip-install-hzls0x9p/pyjhtdb_28744e7f6d4545caa7e7ce8cb563e52d/pyJHTDB/libJHTDB.py", line 38, in <module>
          class libJHTDB(object):
        File "/private/var/folders/s_/hs4wzl4j51d8tj7v6_cz5s3m0000gn/T/pip-install-hzls0x9p/pyjhtdb_28744e7f6d4545caa7e7ce8cb563e52d/pyJHTDB/libJHTDB.py", line 159, in libJHTDB
          start=np.array([0, 0, 0], dtype=np.int),
                                          ^^^^^^
        File "/Users/pete/mambaforge/envs/bl-turb-mod/lib/python3.11/site-packages/numpy/__init__.py", line 305, in __getattr__
          raise AttributeError(__former_attrs__[attr])
      AttributeError: module 'numpy' has no attribute 'int'.
      `np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
      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. Did you mean: 'inf'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
aburlot commented 1 year ago

Same problem here. I don't know if anyone is still maintaining this. The isotropic_spectra_3D example is not up-to-date. I have an error on a deprecated function when working on SciServer.

randalburns commented 1 year ago

Thanks. The JHTDB team will fix this asap. We've transitioning the maintainers. I will take a look and get status ASAP

aburlot commented 1 year ago

Great news! Many thanks.

dgcnz commented 5 months ago

Any updates?

profPlum commented 3 months ago

@randalburns Hi I just encountered this error also. Although I saw a commit where you guys addressed this it seems the pip package is very old and still has this bug.