Can't install plpython on Windows 8.0

Started by Steve - DNDabout 21 years ago8 messagesgeneral
Jump to latest
#1Steve - DND
postgres@digitalnothing.com

I just tried using createlang to install plpython into a database on my
Windows 8.0 installation and continue to receive the error below. The file
plpython.dll is in exactly the location specified below as well. What
exactly am I doing wrong here?

createlang -e -U postgres plpythonu junk
Password:
SELECT oid FROM pg_language WHERE lanname = 'plpythonu';
SELECT oid FROM pg_proc WHERE proname = 'plpython_call_handler' AND
prorettype =
'pg_catalog.language_handler'::regtype AND pronargs = 0;
CREATE FUNCTION "plpython_call_handler" () RETURNS language_handler AS
'$libdir/
plpython' LANGUAGE C;
CREATE LANGUAGE "plpythonu" HANDLER "plpython_call_handler";
createlang: language installation failed: ERROR: could not load library
"C:/Pro
gram Files/PostgreSQL/8.0/lib/plpython.dll": dynamic load error

Thanks,
Steve

#2Steve - DND
postgres@digitalnothing.com
In reply to: Steve - DND (#1)
Re: Can't install plpython on Windows 8.0

I just tried using createlang to install plpython into a database on my
Windows 8.0 installation and continue to receive the error below. The file
plpython.dll is in exactly the location specified below as well. What
exactly am I doing wrong here?

createlang -e -U postgres plpythonu junk
Password:
SELECT oid FROM pg_language WHERE lanname = 'plpythonu';
SELECT oid FROM pg_proc WHERE proname = 'plpython_call_handler' AND
prorettype =
'pg_catalog.language_handler'::regtype AND pronargs = 0;
CREATE FUNCTION "plpython_call_handler" () RETURNS language_handler AS
'$libdir/
plpython' LANGUAGE C;
CREATE LANGUAGE "plpythonu" HANDLER "plpython_call_handler";
createlang: language installation failed: ERROR: could not load library
"C:/Pro
gram Files/PostgreSQL/8.0/lib/plpython.dll": dynamic load error

Actually I just tried createlang with all of the pls(except plpgsql which is
already installed). All of them fail with the same error.

Steve

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Steve - DND (#2)
Re: Can't install plpython on Windows 8.0

"Steve - DND" <postgres@digitalnothing.com> writes:

createlang: language installation failed: ERROR: could not load library
"C:/Program Files/PostgreSQL/8.0/lib/plpython.dll": dynamic load error

Actually I just tried createlang with all of the pls(except plpgsql which is
already installed). All of them fail with the same error.

Probably the problem has to do with not finding the underlying
language's DLL (eg, python.dll). Unfortunately you're only seeing
"dynamic load error" in place of the actually useful information.
Someone needs to improve the stub in win32.c:

char *
dlerror(void)
{
return "dynamic load error";
}

regards, tom lane

#4Daniel Schuchardt
daniel_schuchardt@web.de
In reply to: Steve - DND (#1)
Re: Can't install plpython on Windows 8.0

Steve - DND schrieb:

I just tried using createlang to install plpython into a database on my
Windows 8.0 installation and continue to receive the error below. The file
plpython.dll is in exactly the location specified below as well. What
exactly am I doing wrong here?

createlang -e -U postgres plpythonu junk
Password:
SELECT oid FROM pg_language WHERE lanname = 'plpythonu';
SELECT oid FROM pg_proc WHERE proname = 'plpython_call_handler' AND
prorettype =
'pg_catalog.language_handler'::regtype AND pronargs = 0;
CREATE FUNCTION "plpython_call_handler" () RETURNS language_handler AS
'$libdir/
plpython' LANGUAGE C;
CREATE LANGUAGE "plpythonu" HANDLER "plpython_call_handler";
createlang: language installation failed: ERROR: could not load library
"C:/Pro
gram Files/PostgreSQL/8.0/lib/plpython.dll": dynamic load error

Thanks,
Steve

I have the same problems :

C:\Postgres\bin>createlang.exe -d template1 -U root plpythonu
createlang: language installation failed: ERROR: could not load library
"C:/postgres/lib/plpython.dll": dynamic load error

(library exists at this place...)

Daniel.

#5Steve - DND
postgres@digitalnothing.com
In reply to: Tom Lane (#3)
Re: Can't install plpython on Windows 8.0

createlang: language installation failed: ERROR: could not

load library

"C:/Program Files/PostgreSQL/8.0/lib/plpython.dll": dynamic load error

Actually I just tried createlang with all of the pls(except

plpgsql which is

already installed). All of them fail with the same error.

Probably the problem has to do with not finding the underlying
language's DLL (eg, python.dll). Unfortunately you're only seeing
"dynamic load error" in place of the actually useful information.
Someone needs to improve the stub in win32.c:

char *
dlerror(void)
{
return "dynamic load error";
}

Do I need to install a particular version of python then? Is there any
further documentation that can help me with this?

Thanks,
Steve

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Steve - DND (#5)
Re: Can't install plpython on Windows 8.0

"Steve - DND" <postgres@digitalnothing.com> writes:

Probably the problem has to do with not finding the underlying
language's DLL (eg, python.dll).

Do I need to install a particular version of python then? Is there any
further documentation that can help me with this?

Darn if I know. If the installer documentation doesn't tell you,
I'd suggest griping at the pgsql-hackers-win32 list ...

regards, tom lane

#7Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#6)
Re: Can't install plpython on Windows 8.0

Probably the problem has to do with not finding the underlying
language's DLL (eg, python.dll).

Do I need to install a particular version of python then? Is

there any

further documentation that can help me with this?

Darn if I know. If the installer documentation doesn't tell you,
I'd suggest griping at the pgsql-hackers-win32 list ...

The requirements are listed in the installation instructions at
http://pginstaller.projects.postgresql.org, bullet number 7.
The installer will autodetect if you have the prerequisites installed
when you put it in and disable the option to activate it during the
installation, but you're still free to add it later of course - assuming
you've installed perl/python/tcl by then.

In order to find out what is missing, please run "depends" on the
plpython.dll file (depends.exe is available in the Windows Support
Tools, which are on the standard CD but not installed by default). It
will show you which imports are missing.

//Magnus

#8Daniel Schuchardt
daniel_schuchardt@web.de
In reply to: Magnus Hagander (#7)
Re: Can't install plpython on Windows 8.0

Magnus Hagander schrieb:

Probably the problem has to do with not finding the underlying
language's DLL (eg, python.dll).

Do I need to install a particular version of python then? Is

there any

further documentation that can help me with this?

Darn if I know. If the installer documentation doesn't tell you,
I'd suggest griping at the pgsql-hackers-win32 list ...

The requirements are listed in the installation instructions at
http://pginstaller.projects.postgresql.org, bullet number 7.
The installer will autodetect if you have the prerequisites installed
when you put it in and disable the option to activate it during the
installation, but you're still free to add it later of course - assuming
you've installed perl/python/tcl by then.

In order to find out what is missing, please run "depends" on the
plpython.dll file (depends.exe is available in the Windows Support
Tools, which are on the standard CD but not installed by default). It
will show you which imports are missing.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Ok, the missing library is python23.dll. I installed ActivePython23 and
now everything works fine.

Daniel.