Tuesday 20 August 2013

scikit-learn install failure / numpy not found

scikit-learn install failure / numpy not found

When i try to install scikit-learn on a Suse (openSuse 12.2 x86_64) server
via:
pip install -U scikit-learn
i get the following error:
(....)
compile options: '-I/usr/lib64/python2.7/site-packages/numpy/core/include
-Isklearn/svm/src/libsvm
-I/usr/lib64/python2.7/site-packages/numpy/core/include
-I/usr/include/python2.7 -c'
gcc: sklearn/svm/libsvm.c
sklearn/svm/libsvm.c:303:31: fatal error: numpy/arrayobject.h: No such
file or directory
compilation terminated.
sklearn/svm/libsvm.c:303:31: fatal error: numpy/arrayobject.h: No such
file or directory
compilation terminated.
I already tried:
-installing gcc to the latest version
-installing scikit from a downloaded zip, over easy_install (to avoid old
repos) -uninstalling and reinstalling numpy (over pip)
When i try to install scipy (which is a requirement of numpy) i get a
similar Error:
adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-2.7' to include_dirs.
error: file
'/usr/lib64/python2.7/site-packages/numpy/f2py/src/fortranobject.c' does
not exist
Could be a version conflict but i cant find anythin related on the Web.
Python-dev

No comments:

Post a Comment