Python 在雪豹上安装MySQLdb

Python 在雪豹上安装MySQLdb,python,mysql,django,Python,Mysql,Django,我按照本教程在我的Snow LePad上安装了Django with MySQL: 运行此命令时: python setup.py build 我有很多错误,最后一个是: error: command 'gcc-4.0' failed with exit status 1 这些是我在执行命令行后得到的第一行 running build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.5-fat3-2.7/My

我按照本教程在我的Snow LePad上安装了Django with MySQL:

运行此命令时:

python setup.py build
我有很多错误,最后一个是:

error: command 'gcc-4.0' failed with exit status 1
这些是我在执行命令行后得到的第一行

running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.5-fat3-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/Applications/MAMP/Library/include/mysql -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.5-fat3-2.7/_mysql.o -fno-omit-frame-pointer -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:39:26: error: mysqld_error.h: No such file or directory
_mysql.c:40:20: error: errmsg.h: No such file or directory
_mysql.c:76: error: syntax error before ‘MYSQL’
_mysql.c:76: warning: no semicolon at end of struct or union
_mysql.c:79: error: syntax error before ‘}’ token
有人能帮我修一下吗


谢谢:-)

看起来您缺少MySQL开发头。苹果的支持站点有一个(可能的)解决方案:

其他错误比最终错误更相关,可能从您看到的第一个错误开始,因为
gcc-4.0
是一个有效的终端命令。您也可以发布其他错误吗?您好,我添加了第一行。谢谢你你是在跑雪豹还是豹子?这些不一样。SnowLeopard将不会在PPC机器上运行,而构建脚本需要一台PPC机器。还有,你在运行MAMP吗?这将有它自己的问题。可能重复的