This project is archived and is in readonly mode.

#6 ✓invalid
easiconseil

_PQBackendPID error on Mac OS X SL

Reported by easiconseil | November 4th, 2010 @ 12:08 PM

i use rel-2.2.1 on Mac OS X 10.0.6 (SL) with Python 2.5
i want to use OpenERP 5 with PostGreSQL 8.4

when i build psycopg2, i have the message no appropriate architecture
when i build psycopg2 with FLAG -arch 86x64, i have this message
04/11/10 13:00:13 com.openerp.server[3667] ImportError: dlopen(/Library/Python/2.5/site-packages/openerp-server/psycopg2/psycopg.so, 2): Symbol not found: PQbackendPID

i dont understand.
i dont know where to lookup log files.
please, help me.

sorry for my english, i'm french ;-)
TIA

Comments and changes to this ticket

  • Daniele Varrazzo

    Daniele Varrazzo November 6th, 2010 @ 01:11 AM

    Hello,

    I have no experience with OS X, sorry.

    I have recently found a few articles about compiling psycopg on OS X: see for example http://t.co/Sjfr8Kq and http://t.co/3uzxyDv : please try one of these. It would be nice if you could report back if any of these worked for you, thanks.

  • Daniele Varrazzo

    Daniele Varrazzo November 6th, 2010 @ 01:31 AM

    Here is another article that may be helpful. Googling for _PQBackendPID "os x" returns many results.

  • Daniele Varrazzo

    Daniele Varrazzo November 9th, 2010 @ 03:27 AM

    Another article reported by @sigep311: http://blog.jonypawks.net/2008/06/20/installing-psycopg2-on-os-x/

    I've asked somebody to write a comprehensive article on the subject.

  • Daniele Varrazzo

    Daniele Varrazzo November 11th, 2010 @ 11:59 AM

    • State changed from “new” to “invalid”

    Closing this ticket as it's not a bug. Please use this article as a reference: we can continue the discussion there as it is a more visible place.

  • Charlie_X

    Charlie_X November 11th, 2010 @ 06:40 PM

    ============

    Introduction

    My advice is to use MacPorts <http://macports.org>__ or something similar for installing Python and Postgres. There are several reasons for this: Apple only ships Python with a new version of the OS which can get outdated fairly quickly and they also use non-standard paths for installation which can make it difficult to follow any documentation on installing software on Unix systems. Using MacPorts keeps your software up to date and prevents you getting headaches working out what the error messages mean.

    There are also ports for psycopg2 which you can use. Or you can install the relevant virtualenv package. This depends largely on what you are doing. Virtualenv is more suitable for working with applications that others have written such as BFG, Zope or Django where it may be important to have specific versions of libraries. If you use virtualenv you can isolate a project from a system installation by using the --no-site-packages argument.

    Using MacPorts

    Installing psycopg2 for Python 2.6::

    sudo port install py26-psycopg2

    Installing manually

    psycopg2 compiles without modification assuming pg_config can be found. By default MacPorts doesn't add the Postgres binaries to the path and without this psycopg2 fails to compile. You can either add the relevant path for Postgres binaries to your session variables or profile.::

    export PATH=$PATH:/opt/local/lib/postgresql90/bin

    Assuming you have "pip" installed::

    sudo pip install psycopg2

    Installing in a virtual environment

    Create your virtual environment::

    virtualenv-2.6 --no-site-packages myproject

    This will create a folde myproject with it's own Python binary and library space. I highly recommend you do not use "activate" in the virtual environment as this messes around with environmental variables and can be extremely confusing::

    cd myproject
    bin/pip install psycopg2

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages