开发者

Python mySQL PPC Mac install

I am trying to install mySQL for Python on PPC ibook G4 running Leopard. I have Python 2.7.2, XCODE 3.1.3 and MAMP 1.9.6 installed. I was trying both MySQL-Python-1.2.2 and MySQL-Python-1.2.3, but I am always getting this error:

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
_m开发者_如何学运维ysql.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

Can anybody help me with this? Thanks.


It looks like the MySQL development headers are not found. If running mysql_config from the shell gives an error, that's probably why. Make sure mysql_config is on your path or else edit site.cfg and set the correct path in there. Normally setup.py will bail out if mysql_config exits with an error, so it's not clear what happened here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜