Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

_PQBackendPID error on Mac OS X SL

#6

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

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

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo

    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.

    November 6th, 2010 @ 01:11 AM

  2. Daniele Varrazzo
    Daniele Varrazzo

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

    November 6th, 2010 @ 01:31 AM

  3. Daniele Varrazzo
    Daniele Varrazzo

    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.

    November 9th, 2010 @ 03:27 AM

  4. Daniele Varrazzo
    Daniele Varrazzo
    • 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.

    November 11th, 2010 @ 11:59 AM

  5. Charlie_X
    Charlie_X

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

    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

    November 11th, 2010 @ 06:40 PM