", line 1, in File "/Library/Python/2.6/site-packag...">

Pylons importing the Psycopg2 bug

    Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module>
   from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Library/Python/2.6/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
 Referenced from: /Library/Python/2.6/site-packages/psycopg2/_psycopg.so
 Expected in: flat namespace
 in /Library/Python/2.6/site-packages/psycopg2/_psycopg.so

      

Psycopg2 worked fine, but now I am getting this error.

Any ideas on this matter are greatly appreciated.


EDIT: So after facing so many psycopg2 errors, every time I set up my mac, I decided to use VMWareFusion instead of Ubuntu.

+2


source to share


4 answers


You are getting this error because 64 bit python cannot find 64 bit psycopg2.



You can either downgrade your python to run in 32 bit mode, or try to get 64 bit psycopg2. There are more discussions in this thread on Ben Craiger's blog .

+4


source


Maybe postgres installation has been removed / updated? The symbol is assumed to be owned by libpq.



+1


source


This is for me too, and in my case it is not a problem with 32 and 64 bit:

decibel@workbook.1[6:55]~/src:85%file /opt/local/lib/postgresql83/libpq.dylib 
/opt/local/lib/postgresql83/libpq.dylib: Mach-O 64-bit dynamically linked shared library x86_64
decibel@workbook.1[6:56]~/src:86%file ~/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so 
/Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so: Mach-O universal binary with 3 architectures
/Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so (for architecture i386):   Mach-O bundle i386
/Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so (for architecture ppc7400):    Mach-O bundle ppc
/Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
decibel@workbook.1[6:56]~/src:87%

      

+1


source


+1


source







All Articles