running CREATE EXTENSION plpython3u
gave me the error - The specified module could not be found
even if the file is at the correct place.
After reading everything on the web, I tried to download another python version (3.2) as suggested and replace the dll
.
Now I receive an error about a missing magic block: missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro.
I tried the same processes with a 32 and 64 bits version of Postgresql and both failed like explained.
Is there any solution to install that PLPython on a Windows 64 bits OS?
Make sure Python is added to the PATH by the installer (it's an option when you run the installer). Then re-try after re-starting PostgreSQL. where python-2.7.3.amd64.msi is the filename of the Python binary you installed, and you're installing the 64-bit version to C:\Python27_x64.
Environment Variables The PL/Python procedural language allows PostgreSQL functions and procedures to be written in the Python language. To install PL/Python in a particular database, use CREATE EXTENSION plpythonu (but see also Section 46.1 ).
If you have plpython2.dll but it won't load, you need to install the Python runtime that matches the PostgreSQL version. It must be the same Python major version as was used to compile PostgreSQL, e.g. if Python 2.7 was used to compile PostgreSQL, Python 2.6 won't work to run plpython.
You need to install the package if you have any PostgreSQL 11 functions that use the languages plpython or plpythonu. PostgreSQL is an object-relational SQL database management system. $ sudo apt-cache search ".*plpython3.*" Created the plpython3u extension and verify it.
Worked for me (Windows 7 64-bit)
I installed Python 3.2 from here:
http://www.python.org/ftp/python/3.2/python-3.2.amd64.msi
Somebody screwed something up, so you need to do the following:
find python3.dll in C:\Python32\DLLs (or wherever you installed it)
copy python3.dll to python32.dll (like copy and paste it then rename it)
run create extension plpython3u
in postgres
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With