how to get PL\Python installed on Greenplum cluster?

240 views
Skip to first unread message

Руслан Мазница

unread,
Apr 8, 2016, 6:19:08 AM4/8/16
to gpdb-...@greenplum.org
Hi,

I need PL\Python installed on Greenplum cluster to do analytics with MADlib

On Redhat Enterprise 7 cluster on AWS EC2,  I've built the project taken from https://github.com/greenplum-db/gpdb with configuration like here
sudo ./configure --prefix=/usr/local/gpdb --without-readline --with-python

with-python option is described as "build Python modules (PL/Python)" in configuration and I expect to have the language installed somewhere to the place declared in pg_pltemplate as plpythonu entry, i.e. in $libdir/plpython folder.

Inline image 1


When I try to define new procedural language with "CREATE LANGUAGE plpythonu;" command, I get an error.
Inline image 2

Actually 
- $libdir is not defined in greenplum_path.sh or elsewhere
- plpython folder is absent all across $GPHOME folder
- Python2.7 is installed on the host in /usr/lib64/python2.7/
- Greenplum has its parts on python installed as well, in $GPHOME/lib/python/. 

Piece of configuration output that indicates that python is going to be built, on my mind
Inline image 3
 

Despite all of that, I can't define PL/Python in standard way.

The Greenplum Database PL/Python extension is installed by default with Greenplum Database. Greenplum Database installs a version of Python and PL/Python
This is location of the Python installation that Greenplum Database uses:
$GPHOME/ext/python/

There is no $GPHOME/ext folder created on my hosts during installation, not saying the documentation contradicts to  $libdir/plpython path found in pg_pltemplate.


Are there any ideas how to get PL\Python installed on Greenplum cluster, from scratch or as an upgrade?


Regards,
Ruslan 
  


 

Jimmy Yih

unread,
Apr 8, 2016, 6:56:27 PM4/8/16
to Руслан Мазница, Greenplum Users
Hi Ruslan,

The $GPHOME/ext/python directory is specific to Pivotal Greenplum Database which is just their own shipped Python (equivalent to your system Python).

The $libdir path is defined inside pg_config during compilation.  You can get the path by running "pg_config --libdir" which should give you the path $GPHOME/lib.  The plpython object should be located at $GPHOME/lib/postgresql/plpython.so (which I guess would be $pkglibdir/plpython.so if you check "pg_config --pkglibdir").

Regards,
Jimmy

--
You received this message because you are subscribed to the Google Groups "Greenplum Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gpdb-users+...@greenplum.org.
To post to this group, send email to gpdb-...@greenplum.org.
Visit this group at https://groups.google.com/a/greenplum.org/group/gpdb-users/.
For more options, visit https://groups.google.com/a/greenplum.org/d/optout.

Reply all
Reply to author
Forward
0 new messages