Confusing, desparate MySQLdb problems...
nad at acm.org
Sun Jan 17 01:14:01 CET 2010
<0ba7faf8-f816-4100-ba5b-b138d3008b29 at c3g2000yqd.googlegroups.com>,
stopchuckingstuff <stopchuckingstuff at me.com> wrote:
> I have installed MySQLdb on Mac OSX 10.6.2, and have it working when
> running on my system in IDLE and in terminal, however encounter
> continual problems when running it through Apache.
> When trying to import the module, it gives me this error:
> <type 'exceptions.ImportError'>: /Library/WebServer/.python-eggs/
> MySQL_python-1.2.3c1-py2.6-macosx-10.3-fat.egg-tmp/_mysql.so: no
> appropriate 64-bit architecture (see "man python" for running in 32-
> bit mode)
> Which I just don't understand, as it works perfectly in IDLE?!
> I am running Snow Leopard in 64bit mode, but I don't see how this
> could be the problem when I have already run the module successfully.
Most likely possibility: you've installed another Python on 10.6,
probably from python.org, which only runs in 32-bit mode while Apache is
using the Apple-supplied Python 2.6.1 which, by default, runs in 64-bit
mode. From the terminal, do:
If it's not /usr/bin/python, you're using another Python in the
terminal. You'll need to install a 64-bit version of the MySQLdb and
the MySQL client libraries for the Apple-supplied Python or modify the
Apache setup to either force 32-bit mode for the Apple-supplied Python
or use the other Python (from /usr/local/bin/python2.6 or wherever).
nad at acm.org
More information about the Python-list