0

I'm trying to install the plpython3u extension in my postgresql with this command: CREATE EXTENSION plpython3u;

mas eu recebo este erro:

ERROR: could not load library "C:/Program Files/PostgreSQL/15/lib/plpython3.dll": unknown error 126

My postgresql is in version 15 and was installed from the EDB website. Reading the postgres documentation (found at: C:\Program Files\PostgreSQL15円\doc\installation-notes) I saw that version 15 of postgresql requires python 3.9

NOTE: On Windows we are keeping older Perl version
Perl 5.26
Python 3.9
Tcl 8.6

So I did that, I installed version 3.9 of Python, set the environment variables (both user and system) but the same error persisted

So I tried to install plpython through the Stack Builder language pack, and there I saw that it installed Python 3.10, and also set an environment variable called PYTHONHOME% with this path: C:\edb\languagepack\v3\ Python-3.10 In other words, something is probably wrong in the PostgreSQL documentation. When I saw this I uninstalled python 3.9 (and all environment variables) and installed python 3.10 and added environment variables for both user and system, but the same error persisted

so I went to: "C:/Program Files/PostgreSQL/15/lib/plpython3.dll" to see if my plpython3.dll was present, AND IT IS PRESENT

Any idea what I can do? I really don't know what else to do to solve the problem

to summarize what I tried to do: read the version requested in installation-notes (I tried but it didn't work) install the version that appears in Stack Builder (but it didn't work) I also tried

copy the dll C:\Python\Python310\python310.dll to C:\Windows\System32\python33.dll (name changed from python310 to python33, I saw a guy on a forum who did this and it worked) and in my system32 python3 is also present

asked Jan 8, 2024 at 16:26
7
  • 1) Did you follow all the steps here Language Install? In particular a) Using the graphical installer and b) Configuring Language Pack with PostgreSQL on Windows 2) Don't know if this is a copy/paste error but this C:\edb\languagepack\v3\ Python-3.10 should be C:\edb\languagepack\v3\Python-3.10. Also per 1) b) the Windows PATH needs to have settings added. Commented Jan 8, 2024 at 18:11
  • Hi @AdrianKlaver. Yes, I was able to follow this tutorial, and an environment variable called: PYTHONHOME% was automatically set to the path: C:\edb\languagepack\v3\Python-3.10 but that didn't solve the problem yet Commented Jan 8, 2024 at 18:22
  • Did you follow the instructions here Go to This PC > Properties > Advanced System Settings > Environment Variables. and add the appropriate paths to the system PATH? Commented Jan 8, 2024 at 18:27
  • @AdrianKlaver I was actually forgetting an environment variable I added the missing variable, I managed to create the extension, but now the error I receive is: An I/O error occurred while sending to the backend. x.x Commented Jan 8, 2024 at 18:44
  • I/O error occurred when you where doing what? Commented Jan 8, 2024 at 19:10

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.