Re: Does psycopg2 support Kerberos for Postgres?
От | Yang Gao |
---|---|
Тема | Re: Does psycopg2 support Kerberos for Postgres? |
Дата | |
Msg-id | efb9efbaa8ad4bbfb4f721862c921852@exmbdft5.ad.twosigma.com обсуждение исходный текст |
Ответ на | Re: Does psycopg2 support Kerberos for Postgres? (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
Ответы |
Re: Does psycopg2 support Kerberos for Postgres?
Re: [psycopg] Does psycopg2 support Kerberos for Postgres? |
Список | psycopg |
Hi, Daniele, Thanks for pointing this out. You are absolutely right that conda installs libpq as a dependency of psycopg2. In https://repo.continuum.io/pkgs/free/linux-64/psycopg2-2.6.2-py27_0.tar.bz2, the info/index.json as below contains adependency to the latest libpq which does not have Kerberos support(https://repo.continuum.io/pkgs/free/linux-64/libpq-9.5.4-0.tar.bz2). However, this dependency does not exist forpython3 builds such as psycopg2-2.6.2-py34_0.tar.bz2 and psycopg2-2.6.2-py35_0.tar.bz2. It actually makes sense as theshared libs are often specified by LD_LIBRARY_PATH. Would you agree? Not sure who packages and uploads psycopg2 to the central conda repo, but it would be nice not to have the dependency declaredfor the python2.7 builds. Thanks. Yang ----- Info/Index.json: { "arch": "x86_64", "build": "py27_0", "build_number": 0, "depends": [ "libpq", "openssl", "python 2.7*" ], "license": "LGPL, BSD-like, ZPL", "license_family": "LGPL", "name": "psycopg2", "platform": "linux", "subdir": "linux-64", "version": "2.6.2" } -----Original Message----- From: Daniele Varrazzo [mailto:daniele.varrazzo@gmail.com] Sent: Tuesday, December 06, 2016 8:55 PM To: Yang Gao Cc: Adrian Klaver; psycopg@postgresql.org Subject: Re: [psycopg] Does psycopg2 support Kerberos for Postgres? On Tue, Dec 6, 2016 at 6:09 PM, Yang Gao <Yang.Gao@twosigma.com> wrote: > Got it, so psycopq uses the Postgres c-lib directly. Then, what is the recommended way of managing libpq? Looks like whenI installed psycopq from PyPi, it also pulled down this dependency which has no Kerberos support. Is there better wayto 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 thedreaded error "pg_config" (well, it's sort of unrelated, but libpq and pg_config are regularly packaged together. If notyou'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 kerberossupport. 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 Condaships 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
В списке psycopg по дате отправления: