Choosing GCC version when building ( setup.py )

流过昼夜 提交于 2019-12-23 12:53:10

问题


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

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

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 !


回答1:


Try

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


来源:https://stackoverflow.com/questions/8016520/choosing-gcc-version-when-building-setup-py

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!