I have postgres image: https://hub.docker.com/_/postgres I am trying to create the python extension with the following command:
create extension plpythonu
but it fail with the error:
psql:/docker-entrypoint-initdb.d/init.sql:1: ERROR: could not open extension control file "/usr/share/postgresql/12/extension/plpythonu.control": No such file or directory
in my Dockerfile I try to install the package:
FROM postgres
RUN apt-get update -y
RUN apt install postgresql-plpython3-12
I get error:
Unable to locate package postgresql-plpython3-12
How can I extend the postgresql so that I can use python ?
create extension plpythonuwill install the Python 2 version. If you want the Python 3 version you will need to docreate extension plpython3u.