[MMTK] netcdf again...

Konrad Hinsen research at khinsen.fastmail.net
Wed Sep 1 09:40:22 UTC 2010

On 01.09.2010, at 09:45, Ramon Crehuet wrote:

> However when I try to install MMTK 2.7.2 I get the following error:
> building 'MMTK_DCD' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBM_HAS_ERFC -D_LONG64_ -DEXTENDED_TYPES -IInclude -I/usr/lib/python2.6/site-packages/numpy/core/include -I/usr/include/python2.6 -c Src/MMTK_DCD.c -o build/temp.linux-x86_64-2.6/Src/MMTK_DCD.o -DUSE_NETCDF_H_FROM_SCIENTIFIC=1 -DNUMPY=1
> In file included from Src/MMTK_DCD.c:9:
> Include/MMTK/trajectory.h:15:32: error: Scientific/netcdf.h: No such file or directory
> error: command 'gcc' failed with exit status 1
> Reading the list I found that this error was present in previous versions of MMTK, but that it had been solved. Not for me... :-)

It seems my solution doesn't work for everyone and makes life even worse for some...

If everything went fine with your installation of ScientificPython, you should have a directory


in which there should be, among other files, a copy of netcdf.h. Given the error message you get, either the directory is missing, or the file is missing from the directory.

The only platfrom on which this is known to fail is SuSE Linux. SuSE modifies Python such that headers of add-on packages go to


but doesn't add that directory to the compiler search path. Lots of extension modules don't install correctly under SuSE for that reason. If you use SuSE, a simple workaround is

	env CPATH=/usr/local/include/python2.6 python setup.py build

for installing MMTK.

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

More information about the mmtk mailing list