Re: plpython module import errors

From: c k <shreeseva(dot)learning(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, sim(at)compulab(dot)co(dot)il, mgainty(at)hotmail(dot)com, Karsten(dot)Hilbert(at)gmx(dot)net
Subject: Re: plpython module import errors
Date: 2011-04-28 17:14:09
Message-ID: BANLkTikZRzhLCCd6eh4PZCnxV7=O6AkFrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Cheers!
Solved.
What I did is complied source with python option (it failed even giving
correct python 3.2 as per instruction given in the manual page you have
shown) for python 2.7. From build and installed postgresql, copied
plpython2.so and plpython.so to the developement server and restarted it.
and it get solved.
Thanks to all of you.
Regards,
CPKulkarni

On Thu, Apr 28, 2011 at 9:57 PM, c k <shreeseva(dot)learning(at)gmail(dot)com> wrote:

> Now, I found that python version postresql is using is 2.6 and path to it
> is
> "['/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/python26.zip',
> '/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/python2.6/',
> '/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/python2.6/plat-linux2',
> '/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/python2.6/lib-tk',
> '/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/python2.6/lib-old',
> '/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-linux-x86-apy26-rrun/CoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIxCoReAcTiVePyThOnPrEfIx/lib/lib-dynload']"
>
> what this means? It seems that this path is of the python installation
> which is used to compile default plpython.so.
> If I will compile the source with python 2.7, and change the old
> plpython.so with new, will my problem solved?
> Thanks and regards,
> CPKulkarni
>
>
> On Thu, Apr 28, 2011 at 7:59 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:
>
>> On Thursday, April 28, 2011 7:11:50 am c k wrote:
>>
>> > Yes, there are three version (now). I am aware of only 2.7 installed
>>
>> > by default in /usr/lib directory and 3.2 which I have installed
>>
>> > externally. But the function given above shows version 2.6.4.
>>
>> > Now the question is how to change the version postresql is calling for
>>
>> > function execution?
>>
>> > I have also complied the postgresql source using python option, but
>>
>> > nothing happens. Is there is variable or like where we can set the
>>
>> > python deirectory and version postresql have to use?
>>
>> > Because as per manual, after installing 3.2, I have complied source,
>>
>> > but still it does not support to python 3.2!
>>
>> It can only compile against one and by default that will be the 'system '
>> version. To determine what that is , at the system command line enter:
>>
>> python -V
>>
>> If you want to compile against 3.2 you will have to tell Postgres that.
>> See here for more detail:
>>
>> http://www.postgresql.org/docs/9.0/interactive/install-procedure.html
>>
>> PYTHON
>>
>> Full path to the Python interpreter. This will be used to determine the
>> dependencies for building PL/Python. Also, whether Python 2 or 3 is
>> specified here (or otherwise implicitly chosen) determines which variant of
>> the PL/Python language becomes available. See Section 42.1<http://www.postgresql.org/docs/9.0/interactive/plpython-python23.html>for more information.
>>
>> > Kindly give the details.
>>
>> > Thanks and regards,
>>
>> >
>>
>> > C P Kulkarni
>>
>> >
>>
>> --
>>
>> Adrian Klaver
>>
>> adrian(dot)klaver(at)gmail(dot)com
>>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Peterson 2011-04-29 20:30:26 pgcrypto pgp_pub_decrypt with passphrase broken
Previous Message c k 2011-04-28 16:27:23 Re: plpython module import errors

Browse pgsql-general by date

  From Date Subject
Next Message Jim Irrer 2011-04-28 17:29:31 pervasiveness of surrogate (also called synthetic) keys
Previous Message Scott Ribe 2011-04-28 16:54:00 Re: SSDs with Postgresql?