Python mySQL PPC Mac安装

时间:2011-08-20 11:30:31

标签: osx-leopard mysql-python powerpc

我正在尝试在运行Leopard的PPC ibook G4上安装mySQL for Python。我安装了Python 2.7.2,XCODE 3.1.3和MAMP 1.9.6。 我正在尝试MySQL-Python-1.2.2和MySQL-Python-1.2.3,但我总是遇到这个错误:

andreass-ibook-g4:MySQL-python-1.2.3 aed0101$ sudo python setup.py buildrunning build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -isysroot/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/Applications/MAMP/Library/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.3-fat-2.7/_mysql.o -fno-omit-frame-pointer -g
_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
...more errors
lipo: can't figure out the architecture type of: /var/tmp//ccM5WtnK.out
error: command 'gcc-4.0' failed with exit status 1

有人可以帮我这个吗? 谢谢。

1 个答案:

答案 0 :(得分:1)

看起来没有找到MySQL开发标题。如果从shell运行mysql_config会出错,那可能就是原因。确保mysql_config在您的路径上,或者编辑site.cfg并在其中设置正确的路径。正常情况下,如果mysql_config退出并出现错误,setup.py将会退出,因此不清楚这里发生了什么。