The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/plpython.html Description:
Hi everyone, I am currently trying to install PL/Python on Windows and noticed that no documentation for that currently exists (I hope I didn't miss anything). Unfortunately, it's not so straightforward. The only information is currently available on some Stackoverflow posts, and I found the Stackbuilder documentation for enabling it, which unfortunately is only available for Postgres 14 (and therefore doesn't mention the correct Python version for newer Postgres versions): https://www.enterprisedb.com/docs/epas/14/language_pack/02_installing_language_pack/ I think the Postgres documentation should mention: - what Python one needs (So 3.11 for PG 16) - if only the Stackbuilder Python is supported or also a normal Python install. And if normal Python installs must be installed to some special path. The Stackbuilder version seems to differ from the normal one, it for example doesn't have the pip command, only pip3 (which might be confusing for beginners). It also seems to install itself in a location that is not writable for users, which the normal Python installer doesn't. - what needs to be added to PATH on Windows (and if it needs to be the System or user path.) - other environment variables like PYTHONPATH or PYTHONHOME, which might need to be set. (For standard Python installs one doesn't really need them, but Stackoverflow/the Stackbuilder docs say that one needs them for PL/Python.) - if any attention needs to be paid when installing custom libraries (I don't know, the fact that the stackbuilder installer installs Python installs the files into a non-user-writable directory causes the following warning: https://stackoverflow.com/questions/59997065/pip-python-normal-site-packages-is-not-writeable . But I'm not sure about the specific effects.) PS: Thanks a lot for maintaining postgres!