[MMTK] Fwd: Problem not finding Scientific/netcdfmodule.h and module MMTK_state_accessor

Konrad Hinsen research at khinsen.fastmail.net
Tue Jan 14 08:42:09 UTC 2014


Dear Ramon.

 > I first installed Scientific Python 2.9.2. During the installation it apparently found
 > netcdf in /usr (the header files are in /usr/include/netcdf.h). How can I make sure from
 > python that worked?

If

  import Scientific.IO.NetCDF

works silently (no error message), it should be fine.

 > Next, when I try to build MMTK I got the following error:
 > 
 > In file included from Src/MMTK_DCD.c:8:0:
 > Include/MMTK/trajectory.h:12:37: fatal error: Scientific/netcdfmodule.h: No such file or
 > directory
 >  #include "Scientific/netcdfmodule.h"
 > 
 > Checking my installation I found that file was here:
 > /usr/local/include/python2.7/Scientific/netcdfmodule.h

That looks like the Linux issue that's almost ubiquitous by now: Linux
distributions modify Python in such a way that packages inside the
distribution are installed to /usr and those added by the user go to
/usr/local. Which is fine, of course, except that they don't add
/usr/local/include to the C compiler search path. Apparently Python modules
that add header files are too rare to make an effort.

Your solution is perfectly fine. A simpler one is to use

  env CPATH=/usr/local/include python setup.py install

for compiling and installing MMTK.

 > However, when I import MMTK I get an error. I'm not sure whether it is related to the
 > netcdf issue (it doesn't seem to be, but...)
 > 
 > >>> import MMTK
 > Traceback (most recent call last):
 >   File "<stdin>", line 1, in <module>
 >   File "MMTK/__init__.py", line 47, in <module>
 >     from ThreadManager import activeThreads, waitForThreads
 >   File "MMTK/ThreadManager.py", line 38, in <module>
 >     import MMTK_state_accessor
 > ImportError: No module named MMTK_state_accessor

That's indeed unrelated, and I haven't seen it before. Did you get any
error message during compilation that mentions MMTK_state_accessor?

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
http://dirac.cnrs-orleans.fr/~hinsen/
ORCID: http://orcid.org/0000-0003-0330-9428
Twitter: @khinsen
---------------------------------------------------------------------



More information about the mmtk mailing list