在 Mac 上安装 scipyp 的问题。
我的 Mac 是 10.8,gcc 是 4.2.1,gfortran 是 GNU Fortran (GCC) 4.2.1。
在我下载包并输入sudo python setup.py build
后,它会输出:
Could not locate executable f95
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_clib
building 'arpack_scipy' library
compiling C sources
C compiler: clang -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 -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe
compile options: '-Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -c'
clang: scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c:2:
/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:24:10: fatal error: 'vImage/vImage.h' file not found
#include <vImage/vImage.h>
^
1 error generated.
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c:2:
/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:24:10: fatal error: 'vImage/vImage.h' file not found
#include <vImage/vImage.h>
^
1 error generated.
error: Command "clang -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 -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -c scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c -o build/temp.macosx-10.8-intel-2.7/scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.o" failed with exit status 1
不知道为什么,谁能解释一下?
当我使用时sudo pip install scipy
,输出是:
/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:24:10: fatal error: 'vImage/vImage.h' file not found
#include <vImage/vImage.h>
^
1 error generated.
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c:2:
/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:24:10: fatal error: 'vImage/vImage.h' file not found
#include <vImage/vImage.h>
^
1 error generated.
error: Command "clang -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 -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -c scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c -o build/temp.macosx-10.8-intel-2.7/scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.o" failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools; __file__='/Users/hadoop/Downloads/src/scipy/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /Users/hadoop/Downloads/src/scipy