简体   繁体   English

构建时选择GCC版本(setup.py)

[英]Choosing GCC version when building ( setup.py )

I am trying to build a python module (scikit.timeseries) using 我正在尝试使用构建一个python模块(scikit.timeseries)

python setup.py build

but it's erroring out like this : 但是这样的错误:

/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

This is because I'm on OSX Lion and gcc-4.0 doesn't exit, gcc does though : 这是因为我在OSX Lion上并且gcc-4.0没有退出,gcc确实如此:

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

but it is aliased to gcc not gcc-4.0 . 但它是别名的gcc而不是gcc-4.0。 How can I tell setup.py to look for gcc instead of gcc-4.0 ? 如何告诉setup.py查找gcc而不是gcc-4.0

Thanks ! 谢谢 !

Try 尝试

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM