Khi tôi cố gắng để cài đặt scikit-học trên một máy chủ Suse (openSuSE 12.2 x86_64) thông qua:scikit-học cài đặt thất bại/NumPy không tìm thấy/thiếu tiêu đề NumPy
pip install -U scikit-learn
tôi nhận được lỗi sau:
(....)
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.
tôi đã cố gắng:
-installing gcc phiên bản mới nhất
-installing scikit từ một zip tải về, hơn easy_install (để tránh o Repos ld) -uninstalling và cài đặt lại NumPy (trên pip)
Khi tôi cố gắng để cài đặt scipy (đó là một yêu cầu của NumPy) tôi nhận được một lỗi tương tự:
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
Rõ ràng tất cả các tiêu đề NumPy trong "trang web-gói/numpy/core/include" bị thiếu. Tôi đã cài đặt lại với các pip không có vấn đề gì nhưng các header vẫn bị thiếu.
Nếu bạn thử 'locate arrayobject.h' (hoặc tương đương với Suse), nó sẽ làm gì? – darthbith
tôi không thể tìm thấy bất cứ điều gì. Có vẻ như có một số tệp bị thiếu. –
Bạn đã cài đặt 'định vị' chưa? http://efod.se/blog/archive/2006/01/30/locate-on-suse-based-distributions – darthbith