1

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 スクリプトを取得して、このフォルダーを認識するのに役立ちますか? もしそうなら、どうすればそれを行うことができますか?

前もって感謝します。

4

1 に答える 1

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,
于 2012-11-02T05:58:45.890 に答える