From: Adrian Klaver <adrian.klaver@gmail.com>
To: c k <shreeseva.learning@gmail.com>
Cc: Craig Ringer <ringerc@ringerc.id.au>
Cc: pgsql-general@postgresql.org
Subject: Re: postgresql server crash on windows 7 when using plpython
Date: Wed, 24 Aug 2011 06:41:51 -0700
Message-ID: <201108240641.51863.adrian.klaver@gmail.com> (raw)
In-Reply-To: <CAN2Y=uM+OBMzWihhBTKmY45=JLUYZwGGoJ-CgYywjO5X86h60g@mail.gmail.com>
References: <CAN2Y=uMs3SwWwogKpazMPKFTbuJZngOhaDLxYg+XReJK=BzpPA@mail.gmail.com>
<201108220738.50556.adrian.klaver@gmail.com>
<CAN2Y=uM+OBMzWihhBTKmY45=JLUYZwGGoJ-CgYywjO5X86h60g@mail.gmail.com>
On Tuesday, August 23, 2011 11:10:19 pm c k wrote:
> Yes,
> ImportError: No module named site
> ImportError: No module named site
> ImportError: No module named site
>
> This last line is added every time I call any plpython function. Here is
> the simple plpython function.
>
> CREATE OR REPLACE FUNCTION software.pyver()
> RETURNS text AS
> $BODY$
> import sys
> #return sys.version
> return sys.path
> $BODY$
> LANGUAGE plpythonu VOLATILE
> COST 100;
>
> What is the problem?
plpythonu cannot find the Python installation. site is a module imported by
default by the Python interpreter. When you removed 2.7 you probably also
removed the PATH entries for Python. So to recap, previously you where running
plpythonu compiled with 2.6 using a PATH leading to 2.7, hence the crashes. Now
you have 2.7 out of the way, but no PATH to 2.6.
>
>
> Chaitany Kulkarni
>
--
Adrian Klaver
adrian.klaver@gmail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: adrian.klaver@gmail.com, shreeseva.learning@gmail.com, ringerc@ringerc.id.au, pgsql-general@postgresql.org
Subject: Re: postgresql server crash on windows 7 when using plpython
In-Reply-To: <201108240641.51863.adrian.klaver@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox