mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-g

cnblogs地址:http://www.cnblogs.com/liuqxFuture/archive/2012/10/22/2734082.html,

今天试着安装mysql-python包,刚开始是报“clang”failed with exit status 1,我执行以下命令:

export CC=gcc-4.2

结果报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1错误,愤怒,执行which gcc,无反应,结果找到,是gcc未安装的愿意,两个解决方法:

1、直接下载gcc安装上

2、从http://stackoverflow.com/questions/8473066/gcc-4-2-failed-with-exit-status-1找到解决方法,xcode属性里面下载直接现在command toos,完成后重试which gcc,输出/usr/bin/gcc,

执行:

python setup.py clean

python setup.py build

python setup.py install,安装成功,测试:import MySQLdb,成功。

你可能感兴趣的:(python,command,file,gcc,xcode,python,import)