Thread: createlang plpythonu fails on 64bit windows
Hello,
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
Amtsgericht Stuttgart, HRB 734971
-
persuadere.
et programmare
I am using PostgreSQL 9.0.1 on Windows 7.0 Ultimate 64bit.
I tried to use plpython within one of my databases, but installing the language fails with:
C:\Program Files\PostgreSQL\9.0\lib>createlang --dbname=ibox --echo -U postgres plpythonu
SELECT oid FROM pg_catalog.pg_language WHERE lanname = 'plpythonu';
CREATE LANGUAGE "plpythonu";
createlang: Installation der Sprache fehlgeschlagen: FEHLER: konnte Bibliothek »C:/Program Files/PostgreSQL/9.0/lib/pl
python.dll« nicht laden: %1 is not a valid Win32 application.
(which translated to english is roughly:
createlang: Installation of language failed: ERROR: could not load library »C:/Program Files/PostgreSQL/9.0/lib/plpython.dll« : %1 is not a valid Win32 application.
Should'nt plplython.dll be a valid win32_x64 application when being loaded into PostgreSQL 64bit? Could this be the source of the error? (as in: "plpython.dll is 32 bit, PostgreSQL is 64bit, so no loading of 32-bit-module into 64-bit-process?)
Harald
--
GHUM GmbHHarald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
Amtsgericht Stuttgart, HRB 734971
-
persuadere.
et programmare
On Sun, Oct 24, 2010 at 10:02 AM, Massa, Harald Armin <chef@ghum.de> wrote: > (which translated to english is roughly: > createlang: Installation of language failed: ERROR: could not load library > »C:/Program Files/PostgreSQL/9.0/lib/plpython.dll« : %1 is not a valid > Win32 application. > Should'nt plplython.dll be a valid win32_x64 application when being loaded > into PostgreSQL 64bit? Could this be the source of the error? (as in: > "plpython.dll is 32 bit, PostgreSQL is 64bit, so no loading of 32-bit-module > into 64-bit-process?) plpython.dll is unlikely to be 32bit unless you're using the 32bit Postgres build (it's built along with the rest of the server, so...). What version of Python do you have? A quick glance at the build script shows we're using 2.6, and we always use the ActiveState builds. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
For the record:
GHUM GmbH
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
Amtsgericht Stuttgart, HRB 734971
-
persuadere.
et programmare
> Should'nt plplython.dll be a valid win32_x64 application when being loadedplpython.dll is unlikely to be 32bit unless you're using the 32bit
> into PostgreSQL 64bit? Could this be the source of the error? (as in:
> "plpython.dll is 32 bit, PostgreSQL is 64bit, so no loading of 32-bit-module
> into 64-bit-process?)
Postgres build (it's built along with the rest of the server, so...).
What version of Python do you have? A quick glance at the build script
shows we're using 2.6, and we always use the ActiveState builds.
so, as in IM with Dave:
it destilles down that 64bit PostgreSQL needs a 64bit Python installation on the machine, as plpython.dll pulls in python26.dll; which is found within the path.
I installed Python (64bit edition) in parallel to an existing 32bit version, and the 32bit keeps working despite the c:\windows\system32\python26.dll is a 64bit library ...
(at least up to now)
PostgreSQL accepts the createlang command for plpython when Python 64 bit is present.
Harald
--
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
Amtsgericht Stuttgart, HRB 734971
-
persuadere.
et programmare