MySQLdb and bits
Dafydd Hughes
dafydd61 at gmail.com
Sat Jun 12 17:52:45 EDT 2010
Hi there
This is my first post to the list - please forgive me if this has been
addressed elsewhere.
I'm running MySQL 32-bit in Snow Leopard, and had MySQLdb working well.
I switched to 64-bit, rebuilt MySQLdb, and again it worked fine within
Python, but had to switch back to 32 bit - I'm using a wrapper for
Python within Pure Data, and it forces Python to 32-bit.
So back to 32-bit. It works fine wrapped in Pd, but if I try import
MySQLdb from the terminal, I get:
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.6-fat/egg/MySQLdb/__init__.py", line 19,
in <module>
File "build/bdist.macosx-10.6-fat/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.6-fat/egg/_mysql.py", line 6, in
__bootstrap__
ImportError:
dlopen(/Users/dafydd/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-fat.egg-tmp/_mysql.so,
2): no suitable image found. Did find:
/Users/dafydd/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-fat.egg-tmp/_mysql.so:
mach-o, but wrong architecture
Is there a solution to this? I assume this is happening because Python's
trying to work 64-bit but MySQLdb was built 32. Am I way off base?
Thanks for any help.
cheers
dafydd
More information about the Python-list
mailing list