Re: Trouble installing psycopg2 on Mac OSX 10.6

From: Bill Carithers <wccarithers(at)lbl(dot)gov>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: <psycopg(at)postgresql(dot)org>, William Carithers <wccarithers(at)lbl(dot)gov>
Subject: Re: Trouble installing psycopg2 on Mac OSX 10.6
Date: 2011-05-16 22:42:17
Message-ID: C9F6F659.22852%wccarithers@lbl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi Daniele,

OK, progress. Now it seems to find all the stuff in the new Postgres
installation, and the build/install seems to work-- makes an egg in
site-packages and so on. However, when I try to import psycopg2, I get an
error:
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] 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 "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 71, in
<module>
from psycopg2._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

I'm not including all the build output (it's very long) unless you think it
would be helpful.

Thanks,
Bill

On 5/16/11 3:09 PM, "Daniele Varrazzo" <daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> On Mon, May 16, 2011 at 9:46 PM, Bill Carithers <wccarithers(at)lbl(dot)gov> wrote:
>> Hi Daniele,
>>
>> Thanks for the prompt reply. I tried the two things you suggested. Results
>> are:
>>
>> c4-2c-3-1-f0-3a:psycopg2-2.4.1 williamcarithers$ python setup.py install
>> running install
>> running build
>> running build_py
>> running build_ext
>> pg_config is set to  /Library/PostgreSQL/8.4/bin  <-- the print statement
>
> the setup value should be the full path, not the containing directory,
> something like
>
> /Library/PostgreSQL/8.4/bin/pg_config
>
> I guess.
>
>> error: Permission denied <-- removing the try/except
>
> Seems compatible with trying to execute a directory.
>
>> So it looks like it is getting the correct pg_config from the setup.cfg
>> file. Stupid question--it is looking for the executable pg_config in ./bin
>> and not the pg_config.h in the ./include directory, right?
>
> If you set a value into setup.cfg, it shouldn't be searching for
> anything, but just use that value, and fail if it doesn't work as an
> executable.
>
> -- Daniele

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message A.M. 2011-05-16 22:55:58 Re: Trouble installing psycopg2 on Mac OSX 10.6
Previous Message Daniele Varrazzo 2011-05-16 22:09:14 Re: Trouble installing psycopg2 on Mac OSX 10.6