anjaroesel / netcdf4-python

Automatically exported from code.google.com/p/netcdf4-python
Other
0 stars 0 forks source link

compiliation and import #204

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
 compiling netCDF4-0.9.9 on AIX 5.3 on IBM p6 
2. the code compiles but while importing in python I get error
as below , I am not able to figure out which code calls curl. How do I specify 
location of curl? other than default?

 python
Python 2.7.2 (default, Feb 22 2012, 14:46:51) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import netCDF4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError:    0509-022 Cannot load module /usr/lib/libcurl.a(libcurl.so.4).
    0509-150   Dependent module /usr/lib/libcrypto.a(libcrypto.so.0.9.8) could not be loaded.
    0509-103   The module has an invalid magic number.
    0509-022 Cannot load module /gpfs1/sjo/pkgs/local/lib/python2.7/site-packages/netCDF4.so.
    0509-150   Dependent module /usr/lib/libcurl.a(libcurl.so.4) could not be loaded.

Original issue reported on code.google.com by sjo.India@gmail.com on 8 Oct 2013 at 9:58

GoogleCodeExporter commented 8 years ago
Looks like there's a problem with libcurl (which is used for the opendap 
capability in the netcdf lib).  You could try setting USE_NCCONFIG to 1, and 
the nc-config utility will be used to determine what libs to link. Running 
'nc-config --libs' on the command line give you that information.

My guess is there is not much you can do other than fixing whatever the problem 
is with libcurl and/or libnetcdf.  You may be using a 32-bit python with a 
64-bit lib, or vice versa.

Original comment by whitaker.jeffrey@gmail.com on 8 Oct 2013 at 2:05

GoogleCodeExporter commented 8 years ago
Thank you,
            After keeping nc-config as true I compiled and now the error tells it import netCDF4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "netCDF4.pyx", line 821, in init netCDF4 (netCDF4.c:41220)
ImportError: netCDF4 module must be linked against HDF5 version 1.8.4-patch1 or 
higher, got 1.8.11

I am not sure why it gives an error while it says any thing above 1.8.4 is 
acceptable

with best regards,
Sudheer
below is my nc-config

sjo@f2n2login2../PYthon_modules~$ nc-config --all

This netCDF 4.1.3 has been built with the following features: 

  --cc        -> xlc
  --cflags    ->  -I/gpfs1/sjo/pkgs/local/include -I/gpfs1/sjo/pkgs/local/include
  --libs      -> -L/gpfs1/sjo/pkgs/local/lib -lnetcdf

  --cxx       -> /usr/vacpp/bin/xlC
  --has-c++   -> yes

  --fc        -> /bin/xlf95
  --fflags    ->  -I/gpfs1/sjo/pkgs/local/include
  --flibs     -> -L/gpfs1/sjo/pkgs/local/lib -lnetcdff -lnetcdf
  --has-f77   -> yes
  --has-f90   -> yes

  --has-dap   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --has-hdf5  -> yes
  --has-hdf4  -> no
  --has-pnetcdf-> no
  --has-szlib -> 

  --prefix    -> /gpfs1/sjo/pkgs/local
  --includedir-> /gpfs1/sjo/pkgs/local/include
  --version   -> netCDF 4.1.3

Original comment by sjo.India@gmail.com on 8 Oct 2013 at 4:07

GoogleCodeExporter commented 8 years ago
The 1.8.11 error was fixed a while ago, if you update that should go away.

If the libcurl error persists, you could rebuild netcdf with --disable-dap and 
it won't link libcurl.  Of course, then you lose opendap.

Original comment by whitaker.jeffrey@gmail.com on 8 Oct 2013 at 4:10

GoogleCodeExporter commented 8 years ago

Original comment by whitaker.jeffrey@gmail.com on 26 Feb 2014 at 2:04