Hello,
I am having problems netcdf4-python. I installed netcdf4.1.1 and HD5. For or hdf5 I used:
./configure --prefix=/usr/local/hdf5 --enable-shared --enable-hl
make
sudo make install
For netcdf4 I used
./configure --enable-netcdf-4 --with-hdf5=$HDF5_DIR --enable-shared --prefix=$NETCDF4_DIR
where HDF5_DIR is /usr/local/hdf5 and NETCDF4_DIR is /usr/local/netcdf4
When I try to build netcdf-python I get the following error:
rpacheco@mexico~/PLOTROMS/NETCDF4-PYTHON > python setup.py install
Traceback (most recent call last):
File "setup.py", line 106, in <module>
raise ValueError('did not find netCDF version 4 headers %s' % netCDF4_includedir)
ValueError: did not find netCDF version 4 headers /usr/local/netcdf4/include/
Of course I had already place in the .bashrc the following:
export HDF5_DIR=/usr/local/hdf5/
export NETCDF4_DIR=/usr/local/netcdf4/
export NETCDF4_INCDIR=/usr/local/netcdf4/include/
I would appreciate your help with this!
Rafael
netcdf4-python
Re: netcdf4-python
i) hdf5 must be at least hdf5-1.8.5-patch1
ii) with netcdf4 (worked fine with netcdf-4.1.1)
./configure --enable-netcdf-4 --with-hdf5=$HDFDIR --enable-shared --enable-dap --prefix=<whatever> --disable-fortran
ii) with netcdf4 (worked fine with netcdf-4.1.1)
./configure --enable-netcdf-4 --with-hdf5=$HDFDIR --enable-shared --enable-dap --prefix=<whatever> --disable-fortran
Re: netcdf4-python
hdf5 is hdf5-1.8.6 but did not install dap.
If you could, please tell me what the --prefix=<whatever> means and how did you compile hdf5 as well as zlib, since the command states that you are enabling shared I would very much appreciate it.
Thanks for your reply.
If you could, please tell me what the --prefix=<whatever> means and how did you compile hdf5 as well as zlib, since the command states that you are enabling shared I would very much appreciate it.
Thanks for your reply.
Re: netcdf4-python
Have you looked in the /usr/local/netcdf4/include directory? What is in there?asujrpv wrote: raise ValueError('did not find netCDF version 4 headers %s' % netCDF4_includedir)
ValueError: did not find netCDF version 4 headers /usr/local/netcdf4/include/
The "--prefix=/usr/local/netcdf4" option tells it to "make install" to this directory tree. Did you run "make check" to run the tests? Did it pass the netcdf4 tests?
Re: netcdf4-python
I suspect that your netcdf build actually built netcdf3 libraries. Double check the include and library dirs. Look at the output of configure and make.
Also, DAP support is built into the netCDF4 libraries, not HDF. So there should be no problem there.
Also, DAP support is built into the netCDF4 libraries, not HDF. So there should be no problem there.
-
- Posts: 64
- Joined: Mon Oct 17, 2005 2:02 am
- Location: Institute of Oceanology,Chinese Academy of Sciences
Re: netcdf4-python
I remember I have encountered similar problems when installing netcdf4-python, which could not recognize the environment variables.
I solve this problem by editing the netcdf4-python setup.py file.
I solve this problem by editing the netcdf4-python setup.py file.
Re: netcdf4-python
Thank you all for your reply, I contacted also the developers, here is the answer:
Unfortunately that combination doesn't work. Please see the note here about
only using HDF5-1.8.5-patch1 with netCDF-4.1.1 or using a later version of
netCDF with HDF5-1.8.6. The netCDF-4.1.2 release will be announced soon, and
that is known to work with HDF5-1.8.6:
http://www.unidata.ucar.edu/netcdf/docs ... at-411-186
--Russ
Unfortunately that combination doesn't work. Please see the note here about
only using HDF5-1.8.5-patch1 with netCDF-4.1.1 or using a later version of
netCDF with HDF5-1.8.6. The netCDF-4.1.2 release will be announced soon, and
that is known to work with HDF5-1.8.6:
http://www.unidata.ucar.edu/netcdf/docs ... at-411-186
--Russ
Re: netcdf4-python
One easy way to get netcdf4-python is to pick up the Enthought Python Distribution:
http://www.enthought.com/products/epd.php
The latest version (7.3) includes netcdf4-python built with OPeNDAP support and 100+ other packages as well. The key thing is it works the same on 32 and 64 bit versions of Mac, Linux and Windows. This makes installing a kick-butt scientific python distribution as easy as installing Matlab, and yet it is free for academics, and a mere $200 for everyone else. Enthought are key contributers/maintainers of Numpy and Scipy, the core scientific python packages, so they are good company to support also. I originally bought a copy for myself, and now the USGS is picking up a site license for the EPD, to promote interoperability between USGS python users.
-Rich
http://www.enthought.com/products/epd.php
The latest version (7.3) includes netcdf4-python built with OPeNDAP support and 100+ other packages as well. The key thing is it works the same on 32 and 64 bit versions of Mac, Linux and Windows. This makes installing a kick-butt scientific python distribution as easy as installing Matlab, and yet it is free for academics, and a mere $200 for everyone else. Enthought are key contributers/maintainers of Numpy and Scipy, the core scientific python packages, so they are good company to support also. I originally bought a copy for myself, and now the USGS is picking up a site license for the EPD, to promote interoperability between USGS python users.
-Rich