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

Ramon Crehuet rcrehuet at gmail.com
Tue Jan 14 08:58:10 UTC 2014

2014/1/14 Konrad Hinsen <research at khinsen.fastmail.net>

> 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.

It does work. Good.

> > 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?

The end of the build report the lines I attach at the end of the message.
But there is no error...
The module  after the install is here:


But this directory is not in the sys.path, which is:

If I add that directory to sys.path, things work...

>>> import sys
>>> sys.path.append('/usr/local/lib/python2.7/dist-packages/MMTK/linux2')
>>> import MMTK


PS: Last lines of the build:

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g
-fstack-protector --param=ssp-buffer-size=4 -Wformat
build/temp.linux-x86_64-2.7/Src/MMTK_trajectory_generator.o -lm -o
building 'MMTK_state_accessor' extension
C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

compile options: '-DLIBM_HAS_ERFC -D_LONG64_ -DEXTENDED_TYPES -IInclude
-I/usr/include/python2.7 -c'
x86_64-linux-gnu-gcc: Src/MMTK_state_accessor.c
In file included from
                 from Include/MMTK/arrayobject.h:2,
                 from Src/MMTK_state_accessor.c:235:
warning: #warning "Using deprecated NumPy API, disable it by #defining
 #warning "Using deprecated NumPy API, disable it by #defining
In file included from Include/MMTK/trajectory.h:12:0,
                 from Src/MMTK_state_accessor.c:238:
/usr/local/include/python2.7/Scientific/netcdfmodule.h:262:15: warning:
‘PyNetCDF_API’ defined but not used [-Wunused-variable]
 static void **PyNetCDF_API;
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g
-fstack-protector --param=ssp-buffer-size=4 -Wformat
build/temp.linux-x86_64-2.7/Src/MMTK_state_accessor.o -lm -o
running build_scripts
creating build/scripts-2.7
copying and adjusting tviewer -> build/scripts-2.7
changing mode of build/scripts-2.7/tviewer from 644 to 755

> 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
> ---------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/mmtk/attachments/20140114/457af956/attachment-0001.html>

More information about the mmtk mailing list