[pymvpa] Error when compiling libsvm-c extension

Gilles de Hollander gilles.de.hollander at gmail.com
Mon Mar 19 15:12:30 UTC 2012


Hi there,

I've been struggling with installing PyMVPA on a Linux server for hours now
and I just can't find the problem. When installing using

python setup.py build_ext

I get the following error, when building the 'mvpa.clfs.libsvmc._svmc'
extension:

g++: build/src.linux-x86_64-2.7/mvpa/clfs/libsvmc/svmc_wrap.cpp
build/src.linux-x86_64-2.7/mvpa/clfs/libsvmc/svmc_wrap.cpp:3051:31: fatal
error: numpy/arrayobject.h: No such file or directory
compilation terminated.
build/src.linux-x86_64-2.7/mvpa/clfs/libsvmc/svmc_wrap.cpp:3051:31: fatal
error: numpy/arrayobject.h: No such file or directory
compilation terminated.
error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG
-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/numpy
-I3rd/libsvm -I/usr/lib64/python2.7/site-packages/numpy/core/include
-I/usr/include/python2.7 -c
build/src.linux-x86_64-2.7/mvpa/clfs/libsvmc/svmc_wrap.cpp -o
build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/mvpa/clfs/libsvmc/svmc_wrap.o"
failed with exit status 1

I have installed the latest versions of SWIG and NumPy. I can import numpy
in python without any problems. It is installed in
/usr/lib64/python2.7/site-packages/numpy

I have tried copying arrayobjects.h
from /usr/lib64/python2.7/site-packages/numpy/arrayobjects.h to
/usr/lib64/python2.7/site-packages/numpy/numpy/arrayobjects.h,
then the compiler finds it, but I get an even larger list of
out-of-scope-errors, starting off with:
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:5:2:
error: #error You should not include this

When using

python setup.py build_ext --with-libsvm

I get similar errors

It would make my life a lot easier if I could run my scripts on this
server, so I'm desperate for any tips/help!

Thanks in advance,
Cheers,
Gilles de Hollander
Graduate Student University of Amsterdam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20120319/780f5020/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list