Confusing, desparate MySQLdb problems...
stopchuckingstuff at me.com
Sun Jan 17 19:35:53 CET 2010
On Jan 17, 5:52 pm, Ned Deily <n... at acm.org> wrote:
> In article
> <94e8cfd8-d299-4c23-9e9e-d3f17d4c9... at e16g2000yqc.googlegroups.com>,
> stopchuckingstuff <stopchuckingst... at me.com> wrote:
> > I'm not using either mod_wsgi or mod_python, I just edited httpd.conf.
> > You're right about setuptools - imports in terminal, not in cgi.
> > however, the path to it (/Library/Frameworks/Python.framework/Versions/
> > 2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg)
> > is present in both sys.paths - as i said, both sys.paths are
> > identical.
> > And from printing the sys.paths, /Library/WebServer/.python-eggs
> > doesn't appear, I think it just uses it as a temporary folder to unzip
> > the python eggs into.
> >From your original post:
> > 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)
> so it appears that the .python-eggs directory is on sys.path. But I
> don't know where that directory is coming from in the first place.
> Something you manually created?
> > What I don't understand is if the path is there, why doesn't it find
> > the module?
> Perhaps it is just a permissions problem since Apache is probably
> running under a different user name. Check the owner/group and
> permissions of the various module directories and files. Make sure the
> directories and .so files have at least r-x and the python files at
> least r-- across the board.
> Ned Deily,
> n... at acm.org
Of course! how did i not realise that... it wasn't the python-eggs
directory, but the directory containing the modules (namely /Library/
- i changed the permissions, and its all sorted!
Thank you so much!!
More information about the Python-list