Help with plpython3u

From: PEDRO PABLO SEVERIN HONORATO <ppseverin(at)miuandes(dot)cl>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Help with plpython3u
Date: 2020-06-10 00:09:58
Message-ID: CAB2K=JPRjrR6B5c=Vi8h0B8c4Wt=Y2wLRaita0dx2j4j7-n4aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 integerAS $$ 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)
- The python version I have is 3.7.4. Installed it with Anaconda
- Postgres version is 12.2-1. pgAdmin is 4.18

Please, help me :(
Regards,
PS

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-06-10 00:17:15 Re: Help with plpython3u
Previous Message Peter 2020-06-09 23:35:40 Re: Something else about Redo Logs disappearing