2013-04-28 122 views
1

安裝在Mac scipyp問題。安裝問題在Mac

我的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 
+0

看起來像腳本使用鐺,而不是GCC的。 – 2013-04-28 23:32:15

+0

你在Xcode財產安裝「命令行工具」? – 2013-04-29 06:54:00

+0

同樣的問題在這裏。 – linjunhalida 2013-06-11 12:51:07

回答

0

嘗試this

總之,儘量

CFLAGS="-DVIMAGE_H" python setup.py build