Open-EO / openeo-python-client

Python client API for OpenEO
https://open-eo.github.io/openeo-python-client/
Apache License 2.0
156 stars 42 forks source link

github actions unit tests started failing with "did not find HDF5 headers" #489

Closed soxofaan closed 1 year ago

soxofaan commented 1 year ago

Since yesterday (?) unit tests builds started failing due to netCDF4 installation issue

Collecting netCDF4
  Downloading netCDF4-1.6.5.tar.gz (764 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 765.0/765.0 kB 90.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      Package hdf5 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `hdf5.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'hdf5' found
      reading from setup.cfg...

          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /home/runner/include ...
      hdf5 headers not found in /home/runner/include
      checking /usr/local/include ...
      hdf5 headers not found in /usr/local/include
      checking /sw/include ...
      hdf5 headers not found in /sw/include
      checking /opt/include ...
      hdf5 headers not found in /opt/include
      checking /opt/local/include ...
      hdf5 headers not found in /opt/local/include
      checking /opt/homebrew/include ...
      hdf5 headers not found in /opt/homebrew/include
      checking /usr/include ...
      hdf5 headers not found in /usr/include
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-3n715h9q/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-3n715h9q/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-3n715h9q/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 457, in <module>
        File "<string>", line 398, in _populate_hdf5_info
      ValueError: did not find HDF5 headers
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
soxofaan commented 1 year ago

preceding run that worked has:

Collecting netCDF4
  Downloading netCDF4-1.6.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.6 kB)

note this one found a wheel for netCDF4-1.6.4, while failing run tries to compile netCDF4-1.6.5 from source

soxofaan commented 1 year ago

netCDF4-1.6.5 does not provide built wheels on pypi for py3.7 anymore: https://pypi.org/project/netCDF4/1.6.5/#files netCDF4-1.6.4 is last release with built wheels for py3.7: https://pypi.org/project/netCDF4/1.6.4/#files

soxofaan commented 1 year ago

raised this issue against netCDF project:

soxofaan commented 1 year ago

pinning down netCDF4 for py3.7 works: 0f6abb6