I have spent the last day and a half googling and reading every blog
post on the topic of installing the MySQLdb-python for use with
django. At this point i have not found a solution for my challenge.
I am installing django for development purposes on my MacBook Pro
I successfully installed django and it seems to run just fine until i
want to use it with MySQL
I have MySQL version mysql-5.0.51b-osx10.5-x86
I'm trying to add MySQL-python-1.2.2.tar.gz
when i try to do the build using the command: python setup.py build
I get the following output:
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -
bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/
_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -o build/
lib.macosx-10.3-i386-2.5/_mysql.so
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: for architecture ppc
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning build/
temp.macosx-10.3-i386-2.5/_mysql.o cputype (7, architecture i386) does
not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning /usr/local/
mysql/lib/libmysqlclient_r.dylib cputype (7, architecture i386) does
not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: /usr/local/mysql/lib/
libmysqlclient_r.dylib load command 7 unknown cmd field
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/1D/1DIYDOE7GQ0pbcmmuCcESE++
+TI/-Tmp-//ccHh0Glq.out (No such file or directory)
error: command 'gcc' failed with exit status 1
Because my machine has an intel processor i believe i can ignore the
warnings about the ppc architecture and that the crux of my troubles
stem from the line that says"
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: /usr/local/mysql/lib/
libmysqlclient_r.dylib load command 7 unknown cmd field
collect2: ld returned 1 exit status
I have scoured many blogs and haven't found anyone with the same issue
or a solution. Thanks in advance for any advice you can give.