On Jan 17, 12:14 am, Ned Deily <n...@acm.org> wrote: > In article > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > > > > > > stopchuckingstuff <stopchuckingst...@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: > > which python > > 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). > > -- > Ned Deily, > ...@acm.org
Thanks very much - I think this must be the problem (which python produces some long path to Python 2.6). Ideally, I'd like to change Apache's path to python as I had such problems installing MySQLdb - would you have any idea how to do it? Thanks again for you help Sam -- http://mail.python.org/mailman/listinfo/python-list