编辑MySQLdb Python中使用的C编译器

2024-09-27 07:34:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在macosxlion10.7.3上安装MySQLdb 1.2.3。当我跑的时候

$sudo ARCHFLAGS=“-arch x86_64”python设置.py建造

将抛出一个错误,该错误说明:

 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

我看到了this similar forum post,但注意到MySQLdb 1.2.3没有包含用户_配置.py. 在

我的问题是,我可以编辑哪个.py文件将gcc-4.2更改为gcc?这可能会解决问题。在


Tags: pyinclude错误mysqlsudodynamiccommonx86

热门问题