python install location

Started by Alan Nilssonabout 7 years ago3 messagesgeneral
Jump to latest
#1Alan Nilsson
anilsson@apple.com

How does postgres determine which install of python to use in conjunction with plpythonu? We have a CentOS6 machine with python 2.6 and 2.7 installed on it. The 2.6 version is in the canonical location and the version which gets used when using the plpython extension.

Is there a way, in postgres, short of rebuilding that we can tell postgres which install of python to use when invoking plpython?

thanks
alan

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Alan Nilsson (#1)
Re: python install location

On 3/6/19 4:12 PM, Alan Nilsson wrote:

How does postgres determine which install of python to use in conjunction with plpythonu? We have a CentOS6 machine with python 2.6 and 2.7 installed on it. The 2.6 version is in the canonical location and the version which gets used when using the plpython extension.

Is there a way, in postgres, short of rebuilding that we can tell postgres which install of python to use when invoking plpython?

https://www.postgresql.org/docs/11/plpython-python23.html

thanks
alan

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Alan Nilsson (#1)
Re: python install location

On 2019-03-07 01:12, Alan Nilsson wrote:

How does postgres determine which install of python to use in conjunction with plpythonu?

It looks for a "python" program and then uses that to find the location
of the required library.

Is there a way, in postgres, short of rebuilding that we can tell postgres which install of python to use when invoking plpython?

No, that it determined at build time.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services