I need to import a 3rd party module inside my pl/python function. It seems pl/python uses an internal python that does not have any 3rd party modules.
I get this kind of error:
ERROR: PL/Python: PL/Python function "to_tsvector_luc" failed
DETAIL: <type 'exceptions.ImportError'>: No module named lucene
********** Error **********
ERROR: PL/Python: PL/Python function "to_tsvector_luc" failed
SQL state: XX000
Detail: <type 'exceptions.ImportError'>: No module named lucene
How do I install the module into pl/python, so that I can import it from inside my stored procedure code?
plpython3u
uses the system Python and systemsite-packages
not the local(user) packages. It makes sense as it running in a system service, the Postgres server. – Heilner