<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014/1/14 Konrad Hinsen <span dir="ltr"><<a href="mailto:research@khinsen.fastmail.net" target="_blank">research@khinsen.fastmail.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Ramon.<br>
<div class="im"><br>
 > I first installed Scientific Python 2.9.2. During the installation it apparently found<br>
 > netcdf in /usr (the header files are in /usr/include/netcdf.h). How can I make sure from<br>
 > python that worked?<br>
<br>
</div>If<br>
<br>
  import Scientific.IO.NetCDF<br>
<br>
works silently (no error message), it should be fine.</blockquote><div><br></div><div>It does work. Good.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 > However, when I import MMTK I get an error. I'm not sure whether it is related to the<br><div class="im">
 > netcdf issue (it doesn't seem to be, but...)<br>
 ><br>
 > >>> import MMTK<br>
 > Traceback (most recent call last):<br>
 >   File "<stdin>", line 1, in <module><br>
 >   File "MMTK/__init__.py", line 47, in <module><br>
 >     from ThreadManager import activeThreads, waitForThreads<br>
 >   File "MMTK/ThreadManager.py", line 38, in <module><br>
 >     import MMTK_state_accessor<br>
 > ImportError: No module named MMTK_state_accessor<br>
<br>
</div>That's indeed unrelated, and I haven't seen it before. Did you get any<br>
error message during compilation that mentions MMTK_state_accessor?<br></blockquote><div><br></div><div>The end of the build report the lines I attach at the end of the message. But there is no error...<br></div><div>The module  after the install is here:<br>
<br></div><div>/usr/local/lib/python2.7/dist-packages/MMTK/linux2/MMTK_state_accessor.so<br><br></div><div>But this directory is not in the sys.path, which is:<br>['',<br> '/usr/bin',<br> '/usr/local/lib/python2.7/dist-packages/pymbar-2.0.1_beta-py2.7-linux-x86_64.egg',<br>
 '/usr/lib/python2.7',<br> '/usr/lib/python2.7/plat-x86_64-linux-gnu',<br> '/usr/lib/python2.7/lib-tk',<br> '/usr/lib/python2.7/lib-old',<br> '/usr/lib/python2.7/lib-dynload',<br> '/usr/local/lib/python2.7/dist-packages',<br>
 '/usr/lib/python2.7/dist-packages',<br> '/usr/lib/python2.7/dist-packages/PILcompat',<br> '/usr/lib/python2.7/dist-packages/gtk-2.0',<br> '/usr/lib/pymodules/python2.7',<br> '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',<br>
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',<br> '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',<br> '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',<br> '/usr/lib/python2.7/dist-packages/IPython/extensions']<br>
<br></div><div>If I add that directory to sys.path, things work...<br><br>>>> import sys<br>>>> sys.path.append('/usr/local/lib/python2.7/dist-packages/MMTK/linux2')<br>>>> import MMTK<br>
</div><div>>>><br><br></div><div>Cheers,<br>Ramon<br><br></div><div>PS: Last lines of the build:<br></div><div><br>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 -Werror=format-security build/temp.linux-x86_64-2.7/Src/MMTK_trajectory_generator.o -lm -o build/lib.linux-x86_64-2.7/MMTK/linux2/MMTK_trajectory_generator.so<br>
building 'MMTK_state_accessor' extension<br>C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC<br><br>compile options: '-DLIBM_HAS_ERFC -D_LONG64_ -DEXTENDED_TYPES -IInclude -I/usr/local/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'<br>
extra options: '-DUSE_NETCDF_H_FROM_SCIENTIFIC=1 -DNUMPY=1'<br>x86_64-linux-gnu-gcc: Src/MMTK_state_accessor.c<br>In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1728:0,<br>
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,<br>                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:15,<br>                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/oldnumeric.h:1,<br>
                 from Include/MMTK/arrayobject.h:2,<br>                 from Src/MMTK_state_accessor.c:235:<br>/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]<br>
 #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"<br>  ^<br>In file included from Include/MMTK/trajectory.h:12:0,<br>                 from Src/MMTK_state_accessor.c:238:<br>
/usr/local/include/python2.7/Scientific/netcdfmodule.h:262:15: warning: ‘PyNetCDF_API’ defined but not used [-Wunused-variable]<br> static void **PyNetCDF_API;<br>               ^<br>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 -Werror=format-security build/temp.linux-x86_64-2.7/Src/MMTK_state_accessor.o -lm -o build/lib.linux-x86_64-2.7/MMTK/linux2/MMTK_state_accessor.so<br>
running build_scripts<br>creating build/scripts-2.7<br>copying and adjusting tviewer -> build/scripts-2.7<br>changing mode of build/scripts-2.7/tviewer from 644 to 755<br><br><br></div><div><br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Konrad.<br>
--<br>
---------------------------------------------------------------------<br>
Konrad Hinsen<br>
Centre de Biophysique Moléculaire, CNRS Orléans<br>
Synchrotron Soleil - Division Expériences<br>
Saint Aubin - BP 48<br>
91192 Gif sur Yvette Cedex, France<br>
Tel. <a href="tel:%2B33-1%2069%2035%2097%2015" value="+33169359715">+33-1 69 35 97 15</a><br>
E-Mail: research AT khinsen DOT fastmail DOT net<br>
<a href="http://dirac.cnrs-orleans.fr/~hinsen/" target="_blank">http://dirac.cnrs-orleans.fr/~hinsen/</a><br>
ORCID: <a href="http://orcid.org/0000-0003-0330-9428" target="_blank">http://orcid.org/0000-0003-0330-9428</a><br>
Twitter: @khinsen<br>
---------------------------------------------------------------------<br>
</blockquote></div><br></div></div>