Installing plpythonu on Windows
Asked Answered
K

2

4

I'm trying to install plpython on a postgres server on a Windows machine. When I issue the command CREATE EXTENSION plpython3u; in postgres, I get the following error, which I'm trying to find the source of.

ERROR: could not load library "C:/Program Files/PostgreSQL/9.3/lib/plpython3.dll": The specified module could not be found.

This file exists, which I presume means that Windows can't find one of the files it depends on. When I open the plpython3.dll with Dependency Walker, it tells me it can't locate the GPSVC.dll.

Is it likely that this missing dll would cause the CREATE EXTENSION command to fail? I found a .dll with the same name in C:\Windows\System32 and copied it over to C:\Windows\SysWOW64, but this did not resolve the probelm, and although dependency walker now finds the .dll, it raises several other errors about having modules with different CPU types.

Kg answered 8/1, 2014 at 16:59 Comment(0)
V
3

Use specific python version on Windows. I could get it running with python 3.2.x with postgres 9.3

Verdure answered 30/10, 2014 at 15:50 Comment(0)
A
6

I know this is an old question, but thought I would post to save someone the headaches I went through trying to fix this...

I had the same error trying to add pl python using Postgres 9.5. Dependency walker showed that plpython3.dll was looking for python33.dll, so I installed python 3.3 and added the install directory into my path and that seems to have fixed the problem.

Antimalarial answered 22/8, 2016 at 15:26 Comment(3)
Thanks your answer saved me a lot of time.Sternwheeler
Further, need to restart the Postgres service for any changes in system environment variables to take affect.Lamoreaux
A custom Python install under the user directory did not work for me, I had to use the version from the Stackbuilder Postgres app.Creight
V
3

Use specific python version on Windows. I could get it running with python 3.2.x with postgres 9.3

Verdure answered 30/10, 2014 at 15:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.