建设时选择GCC版本(setup.py) [英] Choosing GCC version when building ( setup.py )

查看:192
本文介绍了建设时选择GCC版本(setup.py)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用

I am trying to build a python module (scikit.timeseries) using

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

这是因为我在OSX Lion上并且gcc-4.0没有退出,所以gcc做到了:

This is because I'm on OSX Lion and gcc-4.0 doesn't exit, gcc does though :

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

but it is aliased to gcc not gcc-4.0 . How can I tell setup.py to look for gcc instead of gcc-4.0 ?

谢谢!

Thanks !

推荐答案

试试

Try

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

这篇关于建设时选择GCC版本(setup.py)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆