[MMTK] Trouble installing MMTK on Linux

khinsen at cea.fr khinsen at cea.fr
Tue Oct 25 08:20:05 CEST 2005

On 24.10.2005, at 23:30, Jaroslaw Kalinowski wrote:

> The problem seems to be with local instalation of NetCDF - compiler  
> can not find includes (netcdf.h: No such file or directory). You  
> can either copy netcdf includes and libraries to system locations  
> or fix setup.py:
>    Extension('MMTK_DCD',
>              ['Src/MMTK_DCD.c', 'Src/ReadDCD.c'],
>              include_dirs=['Include','(path to your netcdf.h)'],
>              libraries=libraries,
>              library_dirs=['(path to your libnetcdf.a)']
>              define_macros=macros),

Right. Note also that netCDF must be installed *before*  
ScientificPython. If netCDF is not installed correctly (which is the  
case if the compiler does not find the headers), then  
ScientificPython must also be reinstalled before reinstalling MMTK.

I strongly recommend putting netCDF into a standard location where  
compiler and linker can find it, because any other approach will  
involve eternal headaches with updates etc. If you cannot install  
into a system-wide standard location such as /usr or /usr/local (e.g.  
because you are not the system administrator), consider creating a  
standard location in your home directory and setting up CPATH and  
LD_LIBRARY_PATH correspondingly.

>> Earlier, when I installed NETCDF I got the following warning -  
>> "Not making
>> 'f90/all' because no FORTRAN-90 compiler". Could this be the  
>> source of the
>> problem? And when I try importing Scientific.IO.NetCDF I get an  
>> error.

No, you do not need the F90 interface.

>> FYI.. my home directory has /bin and a /lib folders and the  
>> python, sci
>> py, num py and net cdf executables are all in the bin folder.

There should also be an "include" folder at the same level. If that  
is the case, define CPATH=$HOME/include in your shell initialization  

Konrad Hinsen
Laboratoire Leon Brillouin (CEA-CNRS), CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr

More information about the mmtk mailing list