Is there any recipe to successfully install PLPython in Postgresql 9.3 64bit or 32bit on Windows 64 bits?

自古美人都是妖i 提交于 2019-12-23 09:48:22

问题


running CREATE EXTENSION plpython3u give 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 sames 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 ?


回答1:


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:

  1. find python3.dll in C:\Python32\DLLs (or wherever you installed it)

  2. copy python3.dll to python32.dll (like copy and paste it then rename it)

  3. run create extension plpython3u in postgres




回答2:


In case anyone has this problem with Postgres 9.4, use the steps in Neil McGuigan's answer, just with Python 3.3 (download link).

Make sure to use the version corresponding to your system (64-bit in most cases).



来源:https://stackoverflow.com/questions/21323236/is-there-any-recipe-to-successfully-install-plpython-in-postgresql-9-3-64bit-or

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!