Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 68C92B5DBF0 for ; Wed, 24 Aug 2011 10:42:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15006-07 for ; Wed, 24 Aug 2011 13:41:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id A6DA9B5DBDC for ; Wed, 24 Aug 2011 10:41:56 -0300 (ADT) Received: by gya6 with SMTP id 6so858751gya.19 for ; Wed, 24 Aug 2011 06:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=LlDWBeDzELJ6ugNbq5dG97gtkJC3K7Vb94NLMheisq8=; b=T53rsy/c4Zbw5eNOSp8GmjrrZuZq5iVQ1tLfikeKidscz0KQk8QfwTDAvDhxeZaGoX wj143EGsR/BfJxntkINI10Djbh8NpvwKqtunojmzed7+jDlpejM9O8Juz8nCwxcrY2be ZMLzYRvXYjHgi5InydFM+9Q3KMVBaiCSsbONc= Received: by 10.236.187.104 with SMTP id x68mr30668770yhm.130.1314193316659; Wed, 24 Aug 2011 06:41:56 -0700 (PDT) Received: from tucker.localnet (c-24-17-164-54.hsd1.wa.comcast.net [24.17.164.54]) by mx.google.com with ESMTPS id z44sm333828yhl.67.2011.08.24.06.41.54 (version=SSLv3 cipher=OTHER); Wed, 24 Aug 2011 06:41:55 -0700 (PDT) From: Adrian Klaver To: c k Subject: Re: postgresql server crash on windows 7 when using plpython Date: Wed, 24 Aug 2011 06:41:51 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.32-33-generic; KDE/4.4.5; i686; ; ) Cc: Craig Ringer , pgsql-general@postgresql.org References: <201108220738.50556.adrian.klaver@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201108240641.51863.adrian.klaver@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.552 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.347 X-Spam-Level: X-Archive-Number: 201108/774 X-Sequence-Number: 179056 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