On Fri, Jul 27, 2012 at 3:39 PM, Alan Etkin <spametki@gmail.com> wrote:
> Thanks to all the detailed tips you've posted for the issue I managed to do
> import psycopg2 in the CentOS 5.8 VPS:
Cool
> -Removed all pg installations in the system (luckily there were no dbs to
> backup)
> -Built/Installed last PostgreSQL dist. at standard location under /usr/local
> -Re-built/installed psycopg2 source dist. (set proper pg_config parameter in
> setup.cfg)
> -I had to do this too, because psycopg2 still complained about libqp.so.5
> location (maybe because of not setting lib dirs in setup.cfg):
No: lib dirs in setup.cfg are unused and have been dropped recently.
Only the results from pg_config are used now.
> # cp /usr/local/<pg lib> /usr/lib
I wouldn't have expected this to be requested. But what was the source
dir exactly? Didn't you have /usr/local/lib/libpq.so?
> After those steps Python2.7.3 plus psycopg2 runs ok. I think the last step
> might have something to do with the fact that the python interpreter
> libraries are installed under /opt/... which I think is a distribution
> non-standard location setup
This sounds strange to me: the only problem is usually to find the
libpq. When psycopg.so is loaded, the python-related libs have already
been loaded.
> Note: perhaps this needs further tests for db connection or other issues
You can try running the test suite with "make check", after setting
the PSYCOPG_TESTDB_* env variables and maybe creating a scratch db.
See tests/testconfig.py to check what are the vars used and their
default.
Cheers,
-- Daniele