2012-08-31 3 views
1

설치시 GSL 헤더 폴더를 감지 할 수 없습니다 :내가 MlPy를 설치 한 다음 문제가 오전 mlpy

sudo python setup.py install 

running install 
running build 
running build_py 
running build_ext 
building 'mlpy.gsl' extension 
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mlpy/gsl/gsl.c -o build/temp.macosx-10.7-intel-2.7/mlpy/gsl/gsl.o 
mlpy/gsl/gsl.c:223:24: error: gsl/gsl_sf.h: No such file or directory 
mlpy/gsl/gsl.c:224:39: error: gsl/gsl_statistics_double.h: No such file or directory 
In file included from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1722, 
       from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17, 
       from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/arrayobject.h:15, 
       from mlpy/gsl/gsl.c:227: 
/Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/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" 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_sf_gamma’: 
mlpy/gsl/gsl.c:835: warning: implicit declaration of function ‘gsl_sf_gamma’ 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_1sf_fact’: 
mlpy/gsl/gsl.c:887: warning: implicit declaration of function ‘gsl_sf_fact’ 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_2stats_quantile_from_sorted_data’: 
mlpy/gsl/gsl.c:1123: warning: implicit declaration of function ‘gsl_stats_quantile_from_sorted_data’ 
mlpy/gsl/gsl.c:223:24: error: gsl/gsl_sf.h: No such file or directory 
mlpy/gsl/gsl.c:224:39: error: gsl/gsl_statistics_double.h: No such file or directory 
In file included from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1722, 
       from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17, 
       from /Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/core/include/numpy/arrayobject.h:15, 
       from mlpy/gsl/gsl.c:227: 
/Library/Python/2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/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" 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_sf_gamma’: 
mlpy/gsl/gsl.c:835: warning: implicit declaration of function ‘gsl_sf_gamma’ 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_1sf_fact’: 
mlpy/gsl/gsl.c:887: warning: implicit declaration of function ‘gsl_sf_fact’ 
mlpy/gsl/gsl.c: In function ‘__pyx_pf_4mlpy_3gsl_2stats_quantile_from_sorted_data’: 
mlpy/gsl/gsl.c:1123: warning: implicit declaration of function ‘gsl_stats_quantile_from_sorted_data’ 
mlpy/gsl/gsl.c: In function ‘__Pyx_BufFmt_ProcessTypeChunk’: 
mlpy/gsl/gsl.c:3761: warning: implicit conversion shortens 64-bit value into a 32-bit value 
mlpy/gsl/gsl.c:3764: warning: implicit conversion shortens 64-bit value into a 32-bit value 
lipo: can't open input file: /var/tmp//cc5P7Y1q.out (No such file or directory) 
error: command 'llvm-gcc-4.2' failed with exit status 1 

내 GSL 헤더 파일을 포함하는 폴더에서입니다 : /usr/local/brew/Cellar/gsl/1.15를/include/gsl 예 : 이 폴더에서 gsl_sf.h를 찾을 수 있습니다.

setup.py 스크립트가이 폴더를 인식하도록 도움을 줄까요? 그렇다면 어떻게 할 수 있습니까?

미리 감사드립니다.

답변

3

gsl이/usr/local/lib와/usr/local/include에 설치되기 때문에 setup.py가 기대하지 않는 것과 동일한 문제가 Mac에 설치되었습니다. 패치 된 setup.py 파일로 mlpy google 그룹의 게시물을 찾았습니다. 아래는 원본의 업데이트 된 버전 사이의 차이점입니다. mp_libdir 및 mp_includedir를 업데이트해야합니다.

< #### macports library/include 
< mp_libdir = ['/usr/local/lib'] 
< mp_includedir = ['/usr/local/include'] 
< 
66,67c62 
<        library_dirs=mp_libdir, 
<        include_dirs=py_inc + np_inc + mp_includedir), 
--- 
>        include_dirs=py_inc + np_inc), 
104,105c99 
<        include_dirs=py_inc + np_inc + mp_includedir, 
<        library_dirs=mp_libdir, 
--- 
>        include_dirs=py_inc + np_inc, 
140,141c134 
<        library_dirs=mp_libdir, 
<        include_dirs=py_inc + np_inc + mp_includedir), 
--- 
>        include_dirs=py_inc + np_inc), 
178,179c171 
<        include_dirs=py_inc + np_inc + mp_includedir, 
<        library_dirs=mp_libdir, 
--- 
>        include_dirs=py_inc + np_inc, 
216,217c208 
<       include_dirs=py_inc + np_inc + mp_includedir, 
<       library_dirs=mp_libdir, 
--- 
>       include_dirs=py_inc + np_inc, 
222,223c213 
<       include_dirs=py_inc + np_inc + mp_includedir, 
<       library_dirs=mp_libdir, 
--- 
>       include_dirs=py_inc + np_inc,