Re: Installing plpython3u

From: Dario Beraldi <dario(dot)beraldi(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Installing plpython3u
Date: 2015-10-15 13:42:07
Message-ID: CAEa0nG6bKtN-LZ9ovo6F=7AmY4ojXxDSV5OqO0BQbs1VJxTevA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Adrian,

Thanks for your answer. Just checking before I screw things up... About
"the source tree has to be configured and built twice", does it mean that I
have to execute again

./configure --prefix=$HOME;
make;
make install

And should I enable any particular option in ./configure? I see there is a
"--with-python" option (not specific to python3 though). If it matters, my
python 3 is in /usr/local/bin/python3.

On 15 October 2015 at 14:20, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 10/15/2015 03:21 AM, Dario Beraldi wrote:
>
>> Hello,
>>
>> I'm having problems installing plpython3u, this is my situation:
>> I have installed postgresql-9.3.5 in my home directory, from source. I
>> used (from my memory, it might not be exact)
>>
>> ./configure --prefix=$HOME;
>> make;
>> make install
>>
>> Now I need to upload a database which requires plpython3u, and this is
>> what happens:
>>
>> pg_restore -U berald01 -d sblab -h localhost -1
>> current_pg_sblab.backup.tar
>>
>> pg_restore: [archiver (db)] Error while PROCESSING TOC:
>> pg_restore: [archiver (db)] Error from TOC entry 1590; 2612 24721
>> PROCEDURAL LANGUAGE plpython3u dberaldi
>> pg_restore: [archiver (db)] could not execute query: ERROR: could not
>> access file "$libdir/plpython3": No such file or directory
>> Command was: CREATE OR REPLACE PROCEDURAL LANGUAGE plpython3u;
>>
>> If I try to create plpython3u I get:
>>
>> createlang plpython3u sblab
>> createlang: language installation failed: ERROR: could not open
>> extension control file
>> "/data/sblab-home/berald01/share/postgresql/extension/plpython3u.control":
>> No such file or directory
>>
>> I'm a bit at a loss, how do I add plpython3u?
>>
>
> See here:
>
> http://www.postgresql.org/docs/9.3/interactive/plpython-python23.html
>
> "Tip: The built variant depends on which Python version was found during
> the installation or which version was explicitly set using the PYTHON
> environment variable; see Section 15.4. To make both variants of PL/Python
> available in one installation, the source tree has to be configured and
> built twice."
>
>
>> My OS is CentOS release 6.
>>
>> Thanks!
>> Dario
>>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-10-15 13:46:19 Re: Installing plpython3u
Previous Message Adrian Klaver 2015-10-15 13:20:48 Re: Installing plpython3u