用于Python的netCDF4模块安装中缺少HDF5标头 [英] HDF5 headers missing in installation of netCDF4 module for Python

查看:1394
本文介绍了用于Python的netCDF4模块安装中缺少HDF5标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试几次安装netCDF4模块,但仍然出现相同的错误:

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

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

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

我对我需要做的事情并不真正熟悉?如果有关系,我还安装了h5py模块.

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

(Windows 8.1)

(Windows 8.1)

推荐答案

您需要在源代码树的基础上创建文件setup.cfg(您可以将其放在应该存在的setup.cfg.template上).具体来说,您需要在文件中设置HDF5_dir的值.

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.

这篇关于用于Python的netCDF4模块安装中缺少HDF5标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆