简体   繁体   English

用于Python的netCDF4模块安装中缺少HDF5标头

[英]HDF5 headers missing in installation of netCDF4 module for Python

I have attempted to install the netCDF4 module several times now and I keep getting the same error: 我已经尝试过几次安装netCDF4模块,但仍然出现相同的错误:

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. 我尝试从他们的网站上使用官方的HDF安装程序,但仍然出现相同的错误(尽管在安装过程中,安装程序警告我PATH太长,因此它不会对其进行更改。

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. 如果重要的话,我还安装了h5py模块。

(Windows 8.1) (Windows 8.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). 您需要在源代码树的基础上创建一个文件setup.cfg (可以将其基于应该存在的setup.cfg.template )。 Specifically, you'll want to set the value of HDF5_dir within the file. 具体来说,您需要在文件中设置HDF5_dir的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM