我在安装 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 脚本识别这个文件夹有帮助吗?如果是这样,我该怎么做?
先感谢您。