Re: Does psycopg2 support Kerberos for Postgres?

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Yang Gao <Yang(dot)Gao(at)twosigma(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Does psycopg2 support Kerberos for Postgres?
Date: 2016-12-07 01:55:03
Message-ID: CA+mi_8bFSZAqAnktjnDNd+MJf=ySHsoY5rAzzd+oK0GsoTp9+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Tue, Dec 6, 2016 at 6:09 PM, Yang Gao <Yang(dot)Gao(at)twosigma(dot)com> wrote:
> Got it, so psycopq uses the Postgres c-lib directly. Then, what is the recommended way of managing libpq? Looks like when I installed psycopq from PyPi, it also pulled down this dependency which has no Kerberos support. Is there better way to overwrite this dependency rather than manually swap it out?

No, installing psycopg2 from PyPI doesn't install the libpq: if not
found already installed in the system it will give the dreaded error
"pg_config" (well, it's sort of unrelated, but libpq and pg_config are
regularly packaged together. If not you'd have a different error at
build time).

I'm sorry I've jumping on the thread only now, and thank you very much
for your support Adrian: I don't know much about kerberos support.

Yang, I see your libpq is at:
/home/yangg/.conda/envs/py2/lib/libpq.so.5.8, so ISTM you haven't
installed psycopg from PyPI but from Conda. It seems Conda ships a
libpq build without kerberos support: you may want to open a bug with
them and ask for a more complete build. AFAICS the libpq version
shipped with stock ubuntu does include kerberos, so 'apt-get install
python-dev libpq-dev && pip install psycopg2' should actually work.

-- Daniele

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Yang Gao 2016-12-08 19:01:53 Re: Does psycopg2 support Kerberos for Postgres?
Previous Message Adrian Klaver 2016-12-06 18:23:49 Re: Does psycopg2 support Kerberos for Postgres?