MySQL Forums
Forum List  »  Connector/Python

Re: Problems in building 1.2.2 on Mac OS 10.5
Posted by: Michal Kox
Date: October 27, 2007 04:06PM

What i did:

1) I removed lines listed below from _mysql.c file

#ifndef uint
#define uint unsigned int

2) I ran command

python build

Yes,I received this warning:

ld: warning in build/temp.macosx-10.5-i386-2.5/_mysql.o, file is not of required architecture
ld: warning in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture

3) I ran command

python install

When I tried to run my python script, an error occured:

import MySQLdb
File "build/bdist.macosx-10.5-i386/egg/MySQLdb/", line 19, in <module>
File "build/bdist.macosx-10.5-i386/egg/", line 7, in <module>
File "build/bdist.macosx-10.5-i386/egg/", line 6, in __bootstrap__
ImportError: dlopen(/Users/kox/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg-tmp/, 2): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib
Referenced from: /Users/kox/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg-tmp/
Reason: image not found

So I did this:

sudo mkdir /usr/local/mysql/lib/mysql
sudo cp /usr/local/mysql/lib/libmysqlclient_r.15.dylib /usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib

And it works now :)

Edited 1 time(s). Last edit at 10/27/2007 04:08PM by Michal Kox.

Options: ReplyQuote

Written By
Re: Problems in building 1.2.2 on Mac OS 10.5
October 27, 2007 04:06PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.