Thread: CREATE PROCEDURAL LANGUAGE plpythonu on windows, with EDB's 8.4.2 installer causes error
CREATE PROCEDURAL LANGUAGE plpythonu on windows, with EDB's 8.4.2 installer causes error
From
Peter Geoghegan
Date:
When attempting to restore a dump of a database with a pl/pythonu function, I encountered the following error (recreated here with psql): postgres=# \c lustre psql (8.4.2) WARNING: Console code page (850) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. You are now connected to database "lustre". lustre=# CREATE PROCEDURAL LANGUAGE plpythonu; ERROR: could not load library "C:/Program Files/PostgreSQL/8.4/lib/plpython.dll ": The specified module could not be found. This is a throwaway VM that I intend to do a little bit of testing on. I installed python 2.7 for windows, thinking that the module that wasn't found was another dll that plpython.dll was in turn dependent on, but doing so hasn't helped - besides, I always understood that the shipped PLs don't have any external dependencies (the docs indicate that it's a simple matter of "createlang plpythonu dbname"). It's quite clear that plpython.dll does exist in the directory specified. What should I do? -- Regards, Peter Geoghegan
Re: CREATE PROCEDURAL LANGUAGE plpythonu on windows, with EDB's 8.4.2 installer causes error
From
Sim Zacks
Date:
Postgresql 8.4 on windows (stackbuilder install) is compiled against Python 2.6, it is probably looking for the dll python26.dll and can't find it. To get it to work, you need to install python 2.6. Sim On 7/8/2010 1:47 PM, Peter Geoghegan wrote: > When attempting to restore a dump of a database with a pl/pythonu > function, I encountered the following error (recreated here with > psql): > > postgres=# \c lustre > psql (8.4.2) > WARNING: Console code page (850) differs from Windows code page (1252) > 8-bit characters might not work correctly. See psql reference > page "Notes for Windows users" for details. > You are now connected to database "lustre". > lustre=# CREATE PROCEDURAL LANGUAGE plpythonu; > ERROR: could not load library "C:/Program Files/PostgreSQL/8.4/lib/plpython.dll > ": The specified module could not be found. > > This is a throwaway VM that I intend to do a little bit of testing on. > I installed python 2.7 for windows, thinking that the module that > wasn't found was another dll that plpython.dll was in turn dependent > on, but doing so hasn't helped - besides, I always understood that the > shipped PLs don't have any external dependencies (the docs indicate > that it's a simple matter of "createlang plpythonu dbname"). It's > quite clear that plpython.dll does exist in the directory specified. > What should I do? > > >
Re: CREATE PROCEDURAL LANGUAGE plpythonu on windows, with EDB's 8.4.2 installer causes error
From
Dave Page
Date:
On Thu, Jul 8, 2010 at 12:30 PM, Sim Zacks <sim@compulab.co.il> wrote: > Postgresql 8.4 on windows (stackbuilder install) is compiled against > Python 2.6, it is probably looking for the dll python26.dll and can't > find it. > To get it to work, you need to install python 2.6. Correct. We use the ActiveState distros of Python, Perl and TCL on Windows (and on the Linux builds from 9.0), but others should work too, provided they're the correct major version. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company
Re: CREATE PROCEDURAL LANGUAGE plpythonu on windows, with EDB's 8.4.2 installer causes error
From
Peter Geoghegan
Date:
Thanks guys; I've installed Python 2.6.4 from the official MSI installer, and everything works fine. -- Regards, Peter Geoghegan