Re: plpythonu and PYTHONPATH/sys.path - Mailing list pgsql-general

From Korin Richmond
Subject Re: plpythonu and PYTHONPATH/sys.path
Date
Msg-id Pine.LNX.4.64.0703061430470.12804@tarrant.cstr.ed.ac.uk
Whole thread Raw
In response to Re: plpythonu and PYTHONPATH/sys.path  (Richard Huxton <dev@archonet.com>)
Responses Re: plpythonu and PYTHONPATH/sys.path  (Korin Richmond <korin@cstr.ed.ac.uk>)
List pgsql-general
On Tue, 6 Mar 2007, Richard Huxton wrote:

> Korin Richmond wrote:
>> Hi,
>>
>> I want to use python modules I have written in plpythonu.  I can load these
>> modules in functions within postgres if they are installed in the
>> "official" python module directories (e.g. /blah/site-packages etc.)
>>
>> However, I want to use modules which are in my home file space, but I can't
>> get this to work.
>
> Does user "postgres" have access to your home directory?

Sorry, yes, I forgot to mention I've checked it's not just a permissions problem
by putting the module in /tmp, readable by everyone, and appending "/tmp" to
sys.path in the function in the database.  Still complains that the module can't
be found though :(

(If I fire up python as user postgres, I can import the module from /tmp.)

Korin

--
=====================================================================
Dr. Korin Richmond              Centre for Speech Technology Research
                                    2 Buccleuch Pl, Edinburgh, EH8 9LW
                                              Tel: +44 (0)131 651 1769

http://www.cstr.ed.ac.uk/ssi/people/korin.html
=====================================================================

pgsql-general by date:

Previous
From: "Webb Sprague"
Date:
Subject: Re: Importing *huge* mysql database into pgsql
Next
From: Csaba Nagy
Date:
Subject: Re: Importing *huge* mysql database into pgsql