[MMTK] netCDF problem

Konrad Hinsen research at khinsen.fastmail.net
Tue Mar 15 08:11:35 UTC 2011


On Mon, 14 Mar 2011 15:05 -0700, "Victor Muñoz"
<chewaka.87 at gmail.com> wrote:

  Dear all,
  You were right. When I type:
         python -c "import Scientific.IO.NetCDF"
  I get an importError:
  ImportError: libnetcdf.so.4: cannot open shared object file:
  No such file or directory
  I have tried to set the NETCDF_PREFIX variable:
  NETCDF_PREFIX=/usr/local/lib/netcdf/
  export NETCDF_PREFIX
  This directory is where include/netcdf.h and lib/libnetcdf.so
  are. However, I cannot make it work as I have always the same
  importError.



The problem is not at the Python module level, but at the
OS-level name resolution of dynamic libraries. The
ScientificPython installation has found your library, but at
run-time it is not found by the OS.

The solution is unfortunately OS-dependent. Under MacOS, you need
to look at the value of DYLD_LIBRARY_PATH. Under Linux, your
netCDF installation probably didn't do an ldconfig call. If you
have someone around who knows your OS well, ask; this is not even
a Python-specific problem.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research AT khinsen DOT fastmail DOT net
---------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/mmtk/attachments/20110315/10c25122/attachment.htm>


More information about the mmtk mailing list