Обсуждение: Installing PLPython - Version Problem

Поиск
Список
Период
Сортировка

Installing PLPython - Version Problem

От
ray
Дата:
I am trying to get Python 2.6 and PostgreSQL 8.3 to work together
under Windows 2000.

When I try to add Python to PostgreSQL via:
createlang plpythonu dbname

But when doing so, I get an error:
createlang: language installation failed: ERROR:  could not load
library "C:/Program Files/PostgreSQL/8.3/lib/createlang: language
installation failed: ERROR:  could not load library "C:/Program Files/
PostgreSQL/8.3/lib/plpython.dll": The specified module could not be
found."

So I Used "depends" to walk the references of plpython.dll, I found
that it can not find python25.dll.  Since I have 2.6, only
python26.dll is in ...system32.

1) The first question is how do I get this stack to look for the 2.6
version?

If I make a copy of python26.dll and rename it python25.dll, that
reference is resolved but a new one appears for apphelp.dll:
Error opening file.  The system cannot find the file specified (2).
Warning: At least on delay-load dependency module was not found.
Warning:  At least on module has an unresolved import due to a missing
export function in a delayed-load dependent module.

2) I do not find apphelp on my system.  Where do I get a copy and
where should it be placed?

When I rename the dll to python26, the PL installed without error.
But I am concerned that something else is wrong.  I would really like
to find out how to get this to install correctly on production
machines.

Ray

Re: Installing PLPython - Version Problem

От
Craig Ringer
Дата:
ray wrote:

> 1) The first question is how do I get this stack to look for the 2.6
> version?

Without rebuilding PL/Python, you can't. Python 2.5 and Python 2.6 are
not binary compatible.

You will need to install Python 2.5.

> If I make a copy of python26.dll and rename it python25.dll, that
> reference is resolved but a new one appears for apphelp.dll:

Python 2.5 and Python 2.6 are not binary compatible. This would most
likely cause crashes in PL/Python functions if it worked at all.

> I would really like
> to find out how to get this to install correctly on production
> machines.

Install Python 2.5 .

--
Craig Ringer

Re: Installing PLPython - Version Problem

От
Dave Page
Дата:
On Mon, Mar 30, 2009 at 1:51 AM, ray <Ray.Joseph@cdicorp.com> wrote:
> I am trying to get Python 2.6 and PostgreSQL 8.3 to work together
> under Windows 2000.
>
> When I try to add Python to PostgreSQL via:
> createlang plpythonu dbname
>
> But when doing so, I get an error:
> createlang: language installation failed: ERROR:  could not load
> library "C:/Program Files/PostgreSQL/8.3/lib/createlang: language
> installation failed: ERROR:  could not load library "C:/Program Files/
> PostgreSQL/8.3/lib/plpython.dll": The specified module could not be
> found."
>
> So I Used "depends" to walk the references of plpython.dll, I found
> that it can not find python25.dll.  Since I have 2.6, only
> python26.dll is in ...system32.
>
> 1) The first question is how do I get this stack to look for the 2.6
> version?

Recompile PostgreSQL to use Python 2.5.

Any renaming etc. will lead to pain. The DLLs include the version
number precisely because they are not compatible.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: Installing PLPython - Version Problem

От
Dave Page
Дата:
On Mon, Mar 30, 2009 at 2:52 PM, Joseph, Ray <Ray.Joseph@cdicorp.com> wrote:
> Dave,
>
> I am sorry that I was not clear.  I want to use 2.6 but the stack seems to direct me to 2.5.

That's exactly what I understood from your email - however my fingers
weren't working properly at that time in the morning :-(. What I was
trying to say was that you must compile your own build of PostgreSQL
if you want to use *2.6*.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: Installing PLPython - Version Problem

От
ray
Дата:
On Mar 30, 2:55 am, dp...@pgadmin.org (Dave Page) wrote:
> On Mon, Mar 30, 2009 at 1:51 AM, ray <Ray.Jos...@cdicorp.com> wrote:
> > I am trying to get Python 2.6 and PostgreSQL 8.3 to work together
> > under Windows 2000.
>
> > When I try to add Python to PostgreSQL via:
> > createlang plpythonu dbname
>
> > But when doing so, I get an error:
> > createlang: language installation failed: ERROR:  could not load
> > library "C:/Program Files/PostgreSQL/8.3/lib/createlang: language
> > installation failed: ERROR:  could not load library "C:/Program Files/
> > PostgreSQL/8.3/lib/plpython.dll": The specified module could not be
> > found."
>
> > So I Used "depends" to walk the references of plpython.dll, I found
> > that it can not find python25.dll.  Since I have 2.6, only
> > python26.dll is in ...system32.
>
> > 1) The first question is how do I get this stack to look for the 2.6
> > version?
>
> Recompile PostgreSQL to use Python 2.5.
>
> Any renaming etc. will lead to pain. The DLLs include the version
> number precisely because they are not compatible.
>
> --
> Dave Page
> EnterpriseDB UK:  http://www.enterprisedb.com
>

Dave,

I am sorry for not providing a clear description of my problem.  I
want to us Python 2.6 but the PLPython seems to me looking for 2.5
which is not on my machine.  Is there a way to have PostgreSQL work
with Python 2.6?

Ray


Re: Installing PLPython - Version Problem

От
Craig Ringer
Дата:
ray wrote:

> I am sorry for not providing a clear description of my problem.  I
> want to us Python 2.6 but the PLPython seems to me looking for 2.5
> which is not on my machine.  Is there a way to have PostgreSQL work
> with Python 2.6?

Recompile PostgreSQL, or at least the PL/Python extension, to use Python
2.6.

You don't want to do this on Windows. It's really no fun. Just download
and install Python 2.5. It installs and runs just fine in parallel with
Python 2.6, and it'll get everything working nice and quickly.

When PostgreSQL 8.4 is released, the Windows builds will probably be
against Python 2.6.

--
Craig Ringer