Anonymous - 2011-03-26

Hello there,

Although this problem seems to be discussed all over again on numerous blogs
and support forums, I've come here to address the issue once more. Because I
just can't get mysql-python running on my Mac I'm using for development.

So here is my setup:

OSX 10.6.7

Mysql 5.5.10 x84_64

Python 2.6 running in 64bit mode

mysql-python 1.2.3

I've built the mysql-python package using

ARCHFLAGS="-arch x86_64" python setup.py build
ARCHFLAGS="-arch x86_64" python setup.py install

numerous times. I've also followed solutions telling me to modify the
mysql_config.path in setup_posix.py and site.cfg.

Trying to import MySQLdb will still result in the following error:

ImportError: dlopen(/Users/x/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.3-x86_64.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
    /Users/x/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.3-x86_64.egg-tmp/_mysql.so: mach-o, but wrong architecture

Has anybody got any clue on what else there is to try? I've even tried
building an 32bit Version mysql-python and running python in 32bit mode. That
does not work either.

Thanks in advance for any help! Have a nice weekend.