HDF5 headers missing in installation of netCDF4 module for Python

2024/10/13 4:25:49

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)

Answer

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://en.xdnf.cn/q/118122.html

Related Q&A

How to catch network failures while invoking get() method through Selenium and Python?

I am using Chrome with selenium and the test run well, until suddenly internet/proxy connection is down, then browser.get(url) get me this:If I reload the page 99% it will load fine, what is the proper…

Pandas crosstab with own function

I have a function which takes two inputs and returns a float e.g. my_func(A, B) = 0.5. I have a list of possible inputs: x = [A, B, C, D, E, F].I want to produce a square matrix (in this case 6 by 6) …

Using a custom threshold value with tf.contrib.learn.DNNClassifier?

Im working on a binary classification problem and Im using the tf.contrib.learn.DNNClassifier class within TensorFlow. When invoking this estimator for only 2 classes, it uses a threshold value of 0.5 …

How to remove certain characters from a variable? (Python)

Lets suppose I have a variable called data. This data variable has all this data and I need to remove certain parts of it while keeping most of it. Lets say I needed to remove all the , (commas) in thi…

criticism this python code (crawler with threadpool)

how good this python code ? need criticism) there is a error in this code, some times script do print "ALL WAIT - CAN FINISH!" and freeze (no more actions are happend..) but i cant find reas…

cx_Freeze executable not displaying matplotlib figures

I am using Python 3.5 and I was able to create an executable using cx_Freeze but whenever I try to run the executable it runs without error but it cannot display any matplotlib figure. I have used Tkin…

Saving variables in n Entry widgets Tkinter interface

Firstly apologises for the length of code but I wanted to show it all.I have an interface that looks like this:When I change the third Option Menu to "List" I will add in the option to have n…

Pulling the href from a link when web scraping using Python

I am scraping from this page: https://www.pro-football-reference.com/years/2018/week_1.htmIt is a list of game scores for American Football. I want to open the link to the stats for the first game. The…

Php: Running a python script using blender from a php project using cmd commands

I need to run in cmd a python script for blender from blender and print the result from a php project, but I dont get the all result. Here is my code:$script = "C:\Users\madalina\Desktop\workspace…

Pymysql when executing Union query with %s (Parameter Placeholder)

This is the code about UNION QUERY:smith =Smithsmithb=Smithsql="""SELECT Distinct Pnumber FROM PROJECT, DEPARTMENT, EMPLOYEE WHERE Dnum = Dnumber AND Mgr_ssn=Ssn AND Lname= %s UNION SELE…