HDF5 headers missing in installation of netCDF4 module for Python

对着背影说爱祢 提交于 2019-12-13 20:09:09

问题


I have attempted to install the netCDF4 module several times now and I keep getting the same error:

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "C:\Users\User\AppData\Local\Temp\pycharm-packaging0.tmp\netCDF4\setup.py", line 219, in <module>

    raise ValueError('did not find HDF5 headers')

ValueError: did not find HDF5 headers

I tried using the official HDF installer from their website and I am still getting the same error (though during the installation the setup warned me that the PATH is too long and so it will not alter it.

Where do these header files need to be? At the moment I (think) have them in

C:\Program Files\HDF_Group\HDF5

I am not really familiar with what I need to do? If it matters I have also installed the h5py module.

(Windows 8.1)


回答1:


You need to create a file setup.cfg in the base of source tree (you can base it on the setup.cfg.template that should be there). Specifically, you'll want to set the value of HDF5_dir within the file.



来源:https://stackoverflow.com/questions/28931204/hdf5-headers-missing-in-installation-of-netcdf4-module-for-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!