[Pythonmac-SIG] Install MySQLdb module on mac os x

Jonathan Wight jwight_lists@spamcop.net
Sun, 08 Dec 2002 19:54:49 -0600


I just ran across this one myself. (Trying to get pyexpat running on a
default 10.2.3).

Has anyone filed a bug with radar for the i386 target in the Makefile
problem?

(While I'm at it I'd like to to get pyexpat and readline into the official
Darwin python build.)

    Jon.

On 11/18/2002 07:52, "Jack Jansen" <Jack.Jansen@oratrix.com> wrote:

> 
> On maandag, nov 18, 2002, at 13:14 Europe/Amsterdam, Dieter Gyselinck
> wrote:
> 
>> Hi,
>> 
>>     I'm trying to install the python MySQLdb module on os x 10.2 but
>> when I try to run 'setup.py build' I get this error message :
>> ld: can't locate file for: -lmysqlclient
>> gcc -arch i386 -arch ppc -bundle -flat_namespace -undefined suppress
>> build/temp.darwin-6.0-Power Macintosh-2.2/_mysql.o -L/usr/lib/mysql
>> -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/sw/lib
>> -lmysqlclient -lz -o build/lib.darwin-6.0-Power
>> Macintosh-2.2/_mysql.so -flat_namespace
>> ld: for architecture i386
> 
> This probably isn't the problem, but you should fix it anyway: Apple
> distributes a /usr/lib/python2.2/config/Makefile that isn't 100%
> correct. Edit it (with sudo) and remove the "-arch i386".
> 
>> ld: warning -L: directory name (/usr/lib/mysql) does not exist
>> ld: warning -L: directory name (/sw/lib) does not exist
> 
> This is the problem, I think: the build procedure doesn't know where
> your mysql library is located. You can probably edit the setup.py file
> to tell it where it is.
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution -- Emma
> Goldman -
> 
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig