Prev: Which is the best implementation of LISP family of languagesfor real world programming ?
Next: Pyro 4.0 released
From: Dafydd Hughes on 12 Jun 2010 17:52 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
From: voidnothings on 19 Jun 2010 20:24 On Jun 13, 5:52 am, Dafydd Hughes <dafyd...(a)gmail.com> wrote: > 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 I got the same problem though in a different scenario. I'm trying to setup my local django environment here and mysql_python fails on me. Same "...mach-o, but wrong architecture" message. Anyone?
From: John Nagle on 20 Jun 2010 17:05
On 6/19/2010 5:24 PM, voidnothings wrote: > On Jun 13, 5:52 am, Dafydd Hughes<dafyd...(a)gmail.com> wrote: >> 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. MySQLdb must match the Python in which it is installed, but the MySQL server doesn't have to be of the same architecture as the client. After all, the server and client don't even have to be on the same machine. John Nagle |