2011-11-04 55 views
3

我試圖用建設(setup.py)

python setup.py build 

建立一個Python模塊(scikit.timeseries),但它的示數出像這樣的時候選擇GCC版本:

/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c' 
gcc-4.0: scikits/timeseries/src/cseries.c 
sh: gcc-4.0: command not found 

這是因爲我在OSX獅子和gcc-4.0不退出,GCC做雖然:

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.0 

,但它的別名與gcc不GCC-4.0。我如何告訴setup.py尋找gcc而不是gcc-4.0

謝謝!

回答

9

嘗試

export CC=/usr/bin/gcc 
python setup.py build