[pymvpa] Install problem on Scientific Linux

Loris Bennett loris.bennett at fu-berlin.de
Tue Mar 6 15:46:26 UTC 2012


I am have tried versions 0.4.6, 0.4.7 and the git snapshot and getting
the following error when trying to install on Scientific Linux 6.1 with
some package from SL 6.2:

| # ./setup.py build
| Traceback (most recent call last):
|   File "./setup.py", line 12, in <module>
|     from numpy.distutils.core import setup, Extension
| ImportError: No module named distutils.core

I can fix this with the following patch:

| 12c12,13
| < from numpy.distutils.core import setup, Extension
| ---
| > import numpy
| > from distutils.core import setup, Extension

I then get the error:

| mvpa2/clfs/libsvmc/svmc_wrap.c:2705:31: error: numpy/arrayobject.h: No such file or directory

which I can fix with this patch:

| 21c22
| < libsvmc_include_dirs = []
| ---
| > libsvmc_include_dirs = ['.',numpy.get_include()]

The next error is:

| mvpa2/clfs/libsvmc/svmc_wrap.c:2718: error: expected specifier-qualifier-list before ‘svm_parameter’

which is due to my libsvn not being in an expected place and can be
fixed by adding the appropriate options.  However, I get a further error:

| # python setup.py build_ext --with-libsvm -I/usr/include/libsvm
| running build_ext
| building 'mvpa2.clfs.libsvmc._svmc' extension
| swigging mvpa2/clfs/libsvmc/svmc.i to mvpa2/clfs/libsvmc/svmc_wrap.c
| swig -python -I. -I/usr/lib64/python2.6/site-packages/numpy/core/include
| -I/usr/include/numpy -I/usr/include/libsvm-3.0/libsvm
| -I/usr/include/libsvm-2.0/libsvm -I/usr/include/libsvm
| -I/usr/local/include/libsvm -I/usr/local/include/libsvm-2.0/libsvm
| -I/usr/local/include -o mvpa2/clfs/libsvmc/svmc_wrap.c
| mvpa2/clfs/libsvmc/svmc.i
| gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
| -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
| --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
| -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
| -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
| -D_GNU_SOURCE -fPIC -fwrapv -fPIC
| -I. -I/usr/lib64/python2.6/site-packages/numpy/core/include
| -I/usr/include/numpy -I/usr/include/libsvm-3.0/libsvm
| -I/usr/include/libsvm-2.0/libsvm -I/usr/include/libsvm
| -I/usr/local/include/libsvm -I/usr/local/include/libsvm-2.0/libsvm
| -I/usr/local/include -I/usr/include/libsvm -I/usr/include/python2.6 -c
| mvpa2/clfs/libsvmc/svmc_wrap.c -o
| build/temp.linux-x86_64-2.6/mvpa2/clfs/libsvmc/svmc_wrap.o
| mvpa2/clfs/libsvmc/svmc_wrap.c:3210: error: conflicting types for ‘svm_node_array_set’
| mvpa2/clfs/libsvmc/svmc_wrap.c:3204: note: previous definition of ‘svm_node_array_set’ was here

This seems to be because 'gcc' is used to compile, rather than 'g++',
and the file name ends in '.c', so the compiler expects C rather than
C++.  If I copy the last call and replace 'gcc' with 'g++', it compiles.

I assume these difficulties do not normally occur and that my set-up is
somehow broken.  Does anyone have an idea what the problem might be?



Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.bennett at fu-berlin.de

More information about the Pkg-ExpPsy-PyMVPA mailing list