[Pythonmac-SIG] Help with psycopg2
Kent Johnson
kent37 at tds.net
Wed Mar 28 15:55:00 CEST 2007
Hi,
I am trying to install PostgreSQL and psycopg2. I would like to get this
working with Python 2.5 and Postgres 8.2.
I installed Postgres from Mark Liyanage's installer:
http://www.entropy.ch/software/macosx/postgresql/
I installed psycopg2 from pythonmac:
http://www.pythonmac.org/packages/py25-fat/mpkg/psycopg2-2.0.5.1-py2.5-macosx10.4.zip
When I import psycopg2 I get an error:
In [1]: import psycopg2
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psycopg2/__init__.py",
line 60, in <module>
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
<type 'exceptions.ImportError'>:
dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psycopg2/_psycopg.so,
2): Library not loaded: /usr/local/pgsql/lib/libpq.4.dylib
Referenced from:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psycopg2/_psycopg.so
Reason: image not found
Looking in /usr/local/pgsql/lib/, I find libpq.5.0.dylib and
libpq.5.dylib but no libpq.4.dylib. Does that mean that this version of
psycopg2 is linked with a different version of Postgres?
How can I get this to work? Should I install Postgres from somewhere else?
I was able to successfully install postgres and psycopg2 using MacPorts
but their version is for Python 2.4 and Postgres 8.1 so it is less than
satisfactory.
Thanks,
Kent
More information about the Pythonmac-SIG
mailing list