Edit C Compiler used in MySQLdb Python

喜你入骨 提交于 2019-12-11 23:31:58

问题


I am trying to install MySQLdb 1.2.3 on Mac OSX Lion 10.7.3. When I run

$ sudo ARCHFLAGS="-arch x86_64" python setup.py build

An error is thrown that says:

 gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk
    -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -                I/usr/local/mysql/include -  I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-x86_64-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch i386
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1

I saw this similar forum post but noticed that MySQLdb 1.2.3 does not include a user_config.py.

My question is, which .py file can I edit to change 'gcc-4.2' to 'gcc'? This could likely fix the problem.


回答1:


Meh.

CC=gcc python setup.py ...


来源:https://stackoverflow.com/questions/9557516/edit-c-compiler-used-in-mysqldb-python

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