Graham Dumpleton wrote:
> On Aug 29, 6:43 am, Huuuze <[EMAIL PROTECTED]> wrote:
> >
> > Is this an issue with Django, psycopg, or both?
>
> The error 'Image not found' on MacOS X normally means that the .so
> doesn't contain the object code for the architecture that the process
> it is being loaded into requires.
>
> This is normally an issue for mod_python and mod_wsgi on Leopard where
> the operating system supplied Apache is compiled with 64 bit support
> and so runs as 64 bit on latest hardware. What happens is that default
> compilation options for Python packages only builds them as 32 bit and
> thus the 64 bit architecture wouldn't be present in C extension
> modules.
>
> Since 'python' executable is not fully fat and only runs as 32 bit
> even if have 64 bit CPU, that you are getting this error when using
> "runserver" would indicate that you have installed pyscopg binaries
> from PowerPC, or if you compiled it yourself, that you have set it up
> to be 64 bit in mistaken belief that since you have 64 bit CPU that
> you would want to.
I encountered the same problem as described above. I compiled python
manually and also compiled psycogp2. The are both i386 packages. But
the problem still occurs:
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2
module: dlopen(/usr/lib/python2.5/site-packages/psycopg2/_psycopg.so,
2): Library not loaded: libpq.5.dylib
Referenced from: /usr/lib/python2.5/site-packages/psycopg2/
_psycopg.so
Reason: image not found
Somebody suggested to look into it from the shell, but result is the
same:
Python 2.5.2 (r252:60911, Sep 17 2008, 06:47:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/psycopg2/__init__.py", line
60, in <module>
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/usr/lib/python2.5/site-packages/psycopg2/
_psycopg.so, 2): Library not loaded: libpq.5.dylib
Referenced from: /usr/lib/python2.5/site-packages/psycopg2/
_psycopg.so
Reason: image not found
Any idea how to fix that?
> Graham
So long,
Andrej
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---