-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"DLL load failed while importing _netCDF4" with netCDF-C 4.9.0 and HDF5 1.10.8 #1230
Comments
Although you say the build went fine, something likely went wrong with either the build or install. I would suggest saving the output of the build and posting it here. HDF5 1.10.8 should work fine. |
Please find the output of 'python setup.py build' and 'python setup.py install' in the two files build.log and install.log respectively. Another thing I would like to mention is that for 'import netCDF4' to actually work, I have to copy the extracted binaries from the 'bin' folder (from the Unidata netCDF page) to the folder 'AppData\Local\Programs\Python\Python311\Lib\site-packages\netCDF4-1.6.2-py3.11-win-amd64.egg\netCDF4'. Even if I set the HDF5_DIR and NETCDF4_DIR env variables to the location of my netCDF binaries while building netCDF4-Python, 'import netCDF4' works only if I copy the Unidata binaries. |
hopefully someone with some knowledge of building and installing python C extensions with C lib dependencies on windows will chime in - I have no clue. Curious why installing via pip or conda is not an option for you? |
conda is not an option for us because of legal restrictions in our organization. |
I am having the same issue when using conda:
|
Please open an issue in the proper conda channel. If that is conda-forge it should be in https://github.com/conda-forge/netcdf4-feedstock |
I am not sure it really is conda-forge since the version I have installed is 1.6.2, installed using conda install netcdf4 |
The template issue there will request some information that will help you sort that out. Just follow the instructions there. |
Version : netCDF4-python 1.6.2
OS: Windows 10
Python version: 3.11.1
I am trying to follow the steps from the page (https://unidata.github.io/netcdf4-python/#developer-install) to build netCDF4-Python v1.6.3 with netCDF-C and HDF5 that we build ourselves (instead of using the pip package manager).
Our netCDF-C version is 4.9.0, and we have linked it to HDF5 1.10.8.
With these versions of netCDF-C and HDF5, the netCDF4-Python build goes fine but when I execute "import netCDF4", I see the following error:
I do not see the error and everything works fine if I download the netCDF-C v4.9.0 binaries from the following site (https://downloads.unidata.ucar.edu/netcdf/). Here, netCDF-C is built with HDF5 1.12.1.
Is there a requirement for the HDF5 version to be 1.12.1 or is HDF5 v1.10.8 not supported in netCDF-C v1.6.2?
If not, can some help me to resolve this error?
The text was updated successfully, but these errors were encountered: