Re: BUG #16221: ERROR while importing Plpython , pltcl

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, kalyan(dot)singh(at)capgemini(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16221: ERROR while importing Plpython , pltcl
Date: 2020-01-21 17:18:42
Message-ID: CAC+AXB2OymeZHRN4Un6twj+2DitKmuLRqqU+E3RBvzNwz1znQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 21, 2020 at 4:16 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> > On Tue, Jan 21, 2020 at 8:35 AM PG Bug reporting form
> > <noreply(at)postgresql(dot)org> wrote:
> >> We are trying to import “plpythonu” in postgresql but when running the
> >> below query we are getting an error:-
> >> CREATE EXTENSION plpythonu
> >> ERROR: could not load library "C:/Program
> >> Files/PostgreSQL/11/lib/plpython2.dll": The specified module could not
> be
> >> found.
> >> Although I have “plpython2.dll” is there in the same location.
>
> > If all the files are present in the expected location, this is
> > probably due to wrong privilege access on the files, or some antivirus
> > preventing postgres from loading the libs. Have you tried after
> > disabling the antivirus or configuring an exception for the postgres'
> > directories?
>
> Another likely theory is that the message is not trying to complain
> about plpython2.dll, but about some library that that depends on,
> probably libpython itself. If you look into the postmaster log file,
> rather than just at what's reported to the client, you might find
> some additional low-level messages clarifying this.
>

Your python installation must match the version of the plpython2.dll, so
python 3.8 won't work.

Also make sure the python path is added to the PATH environment variable.

> If this were a Linux machine I'd recommend using "ldd" to investigate
> the dependencies of plpython2.dll. But I don't know what the equivalent
> tool for Windows is.
>
>
This would be Dependencies:

https://github.com/lucasg/Dependencies

TL;DR If your plpython2.dll points to python27.dll, you will need a
python 2.7 installation in your PATH.

Regards,

Juan José Santamaría Flecha

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-01-21 17:52:29 Re: BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS
Previous Message PG Bug reporting form 2020-01-21 17:16:16 BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS