[Pythonmac-SIG] MySQL-Python Help

Bob Ippolito bob at redivi.com
Wed Feb 16 14:55:30 CET 2005


On Feb 14, 2005, at 10:20, Jason Vance wrote:

> I'm pretty new to python development on the Mac. I'm not sure that if  
> this is the appropriate place to place this question, but I'm having  
> problems getting the MySQL-python v1.2.0 working on my mac. When I try  
> and set it up, as per the instructions I get the following errors:
>
> jasonvance$ python setup.py build
> running build
> running build_py
> running build_ext
> building '_mysql' extension
> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp  
> -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall  
> -Wstrict-prototypes -I/sw/include/mysql  
> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ 
> python2.3 -c _mysql.c -o  
> build/temp.darwin-7.8.0-Power_Macintosh-2.3/_mysql.o  
> -I/sw/include/mysql -O3 -fomit-frame-pointer
> In file included from _mysql.c:31:
> pymemcompat.h:10:20: Python.h: No such file or directory
> _mysql.c:40:26: structmember.h: No such file or directory

Those are the lines that matter -- any errors after a missing header  
file aren't really even worth tracking down.

I bet MySQL-python has lines that look like:
#include <Python.h>

When it *should* have lines that look like:
#include "Python.h"

... either that, or you don't have Xcode installed, and you're missing  
the headers for Python.

-bob



More information about the Pythonmac-SIG mailing list