pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: PEDRO PABLO SEVERIN HONORATO <ppseverin@miuandes.cl>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help with plpython3u
Date: Tue, 9 Jun 2020 17:37:19 -0700
Message-ID: <a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com> (raw)
In-Reply-To: <CAB2K=JNLm1xkqZgtmTD1d-gbfjGTknxLRfK6Se4YbruOch-3rw@mail.gmail.com>
References: <CAB2K=JPRjrR6B5c=Vi8h0B8c4Wt=Y2wLRaita0dx2j4j7-n4aQ@mail.gmail.com>
	<630c303b-1c82-90dc-b602-54e461335fc6@aklaver.com>
	<CAB2K=JNLm1xkqZgtmTD1d-gbfjGTknxLRfK6Se4YbruOch-3rw@mail.gmail.com>

On 6/9/20 5:26 PM, PEDRO PABLO SEVERIN HONORATO wrote:
> Hi Adrian,
> 
> I installed Postgres downloading the file posgresql-12.2-1-windows-x64 
> from the website https://www.postgresql.org/download/windows/.

Did you go through the steps here?:

https://www.enterprisedb.com/edb-docs/d/postgresql/user-guides/language-pack-guide/12/toc.html

> 
> The python37.dll I copied to the System32 folder was located 
> in C:\Users\developer\Anaconda3.
> After trying this, I installed python 3.7.0 and copied the python37.dll 
> that comes with the installation, but got the same result.
> 
> Thanks,
> PS
> 
> El mar., 9 jun. 2020 a las 20:17, Adrian Klaver 
> (<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>) escribió:
> 
>     On 6/9/20 5:09 PM, PEDRO PABLO SEVERIN HONORATO wrote:
>      > Hello!
>      >
>      > I'm cracking my head while trying to make python language work
>     within
>      > postges. I executed "*create extension plpython3u*" but I get
>     this error:
>      >
>      > "*ERROR: could not load library "C:/Program
>      > Files/PostgreSQL/12/lib/plpython3.dll": The specified module
>     could not
>      > be found. SQL state: 58P01*"
>      >
>      > Looking into several stackoverflow pages and asking like
>     everywhere, I
>      > also installed dependency walker and saw that python37.dll was
>     required.
>      > My PC already has python 3.7.4, but I don't know if that is an
>     issue and
>      > postgres requires python 3.7.0 strictly.
>      >
>      > I also copied the python37.dll file directly in the System32
>     folder, as
>      > some pages suggested. That actually made it possible to run the
>      > "* create extension plpython3u* ", but when I try to create a simple
>      > function like:
>      >
>      > "*CREATE FUNCTION pymax (a integer, b integer)*
>      > *  RETURNS integer
>      > AS $$
>      >    if a > b:
>      >      return a
>      >    return b
>      > *
>      > *$$ LANGUAGE plpython3u*;"
>      >
>      > The server crashes and I get this message: "*Connection to the
>     server
>      > has been lost*."
>      >
>      > Some additional information:
>      > - My PC is running windows server 2019 64 bits (its a vps)
> 
>     How did you install Postgres?
> 
>      > - The python version I have is 3.7.4. Installed it with Anaconda
> 
>     Unless things have changed since the last time I used Anaconda, it
>     basically creates virtualenvs for it's installs. So when you refer to
>     the Python dll above are you talking about a system installed one or
>     one
>     from within the Anaconda environment?
> 
>      > - Postgres version is 12.2-1. pgAdmin is 4.18
>      >
>      > Please, help me :(
>      > Regards,
>      > PS
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (21+ messages)  latest in thread

Message-ID: <a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com>
Permalink:  ../a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com/
Also on:    postgresql.org/message-id/a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ppseverin@miuandes.cl
  Subject: Re: Help with plpython3u
  In-Reply-To: <a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com>
  References: <CAB2K=JPRjrR6B5c=Vi8h0B8c4Wt=Y2wLRaita0dx2j4j7-n4aQ@mail.gmail.com> <630c303b-1c82-90dc-b602-54e461335fc6@aklaver.com> <CAB2K=JNLm1xkqZgtmTD1d-gbfjGTknxLRfK6Se4YbruOch-3rw@mail.gmail.com> <a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.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