Thread: Can't install plpython on Windows 8.0

Can't install plpython on Windows 8.0

From
"Steve - DND"
Date:
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



Re: Can't install plpython on Windows 8.0

From
"Steve - DND"
Date:
> 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



Re: Can't install plpython on Windows 8.0

From
Tom Lane
Date:
"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

Re: Can't install plpython on Windows 8.0

From
Daniel Schuchardt
Date:
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.

Re: Can't install plpython on Windows 8.0

From
"Steve - DND"
Date:
> >> 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



Re: Can't install plpython on Windows 8.0

From
Tom Lane
Date:
"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

Re: Can't install plpython on Windows 8.0

From
"Magnus Hagander"
Date:
>>> 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

Re: Can't install plpython on Windows 8.0

From
Daniel Schuchardt
Date:
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.