usgs / gspy

Other
15 stars 5 forks source link

hd5 headers not found during install #9

Closed Neil-Symington closed 10 months ago

Neil-Symington commented 10 months ago

The pip install returned the following error.

Collecting gspy Downloading https://files.pythonhosted.org/packages/1a/1b/cbbcc83fc380ec04e1465757a66066a5f6eabf9578196e07a7263b02ad58/gspy-1.0.1-py3-none-any.whl Collecting netcdf4 (from gspy) Downloading https://files.pythonhosted.org/packages/8f/39/f8c4b2f3a4d78164e9850bb0924e1fd490e0bf8a8366b9b42cd295d7bbee/netCDF4-1.6.4.tar.gz (778kB) |████████████████████████████████| 788kB 2.2MB/s Installing build dependencies ... done Getting requirements to build wheel ... error ERROR: Complete output from command 'C:\W10DEV\Anaconda3\python.exe' 'C:\W10DEV\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\u77932\AppData\Local\Temp\tmpe70ax7p2': ERROR: reading from setup.cfg...

  HDF5_DIR environment variable not set, checking some standard locations ..

checking C:\W10DEV\Anaconda3\envs\gspy\include ... hdf5 headers not found in C:\W10DEV\Anaconda3\envs\gspy\include checking C:\W10DEV\Anaconda3\envs\gspy\Library\include ... hdf5 headers not found in C:\W10DEV\Anaconda3\envs\gspy\Library\include checking C:\Users\u77932\include ... hdf5 headers not found in C:\Users\u77932\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 "C:\W10DEV\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 207, in main() File "C:\W10DEV\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 197, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\W10DEV\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 54, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users\u77932\AppData\Local\Temp\pip-build-env-j3ezp6kn\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "C:\Users\u77932\AppData\Local\Temp\pip-build-env-j3ezp6kn\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.run_setup() File "C:\Users\u77932\AppData\Local\Temp\pip-build-env-j3ezp6kn\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 457, in File "", line 398, in _populate_hdf5_info ValueError: did not find HDF5 headers

ERROR: Command "'C:\W10DEV\Anaconda3\python.exe' 'C:\W10DEV\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\u77932\AppData\Local\Temp\tmpe70ax7p2'" failed with error code 1 in C:\Users\u77932\AppData\Local\Temp\pip-install-82htu6ur\netcdf4

leonfoks commented 10 months ago

Hi @Neil-Symington

Since you are on windows, try installing h5py through conda, before installing gspy. Conda, I believe, will correctly install the HDF5 library before installing h5py on top.

conda install h5py
pip install gspy
Neil-Symington commented 10 months ago

This seems to have done the trick. Perhaps I could have tried this myself but I have spent enough days in dependency hell that it is often easier to go back to the source. Much love

leonfoks commented 10 months ago

100% understand! Glad it worked!