错误期间:创建扩展plpython3u;在PostgreSQL 9.6.0

时间:2022-06-22 20:24:01

I have installed PostgreSQL Server 9.6.0 and Python 3.4.2 on Windows 2012 R2 Server.

我在Windows 2012 R2服务器上安装了PostgreSQL Server 9.6.0和Python 3.4.2。

I copied plpython3.dll to C:/Program Files/PostgreSQL/9.6/lib/

我复制plpython3。dll到C:/ / PostgreSQL / 9.6 / lib /程序文件

The in PostgreSQL I try running this command: CREATE EXTENSION plpython3u;

在PostgreSQL中,我尝试运行这个命令:创建扩展plpython3u;

And I receive this message:

我收到以下信息:

ERROR: could not load library "C:/Program Files/PostgreSQL/9.6/lib/plpython3.dll": The specified module could not be found.

错误:无法装入库“C:/程序文件/PostgreSQL/9.6/lib/plpython3”。dll:无法找到指定的模块。

Under this folder: C:\Program Files\PostgreSQL\9.6\share\extension there are plpython3u files.

在此文件夹下:c:) program

How can I get PostgreSQL to recognize this Python 3 extension?

如何获得PostgreSQL来识别此Python 3扩展?

Thanks!

谢谢!

3 个解决方案

#1


0  

plpython3.dll in the official package is built against python 3.3, not python 3.4. What it expect is python33.dll in system32 folder. You need to install python 3.3 for your system.

plpython3。官方包中的dll是针对python 3.3构建的,而不是python 3.4。它所期望的是python33。dll system32系统文件夹中。您需要为系统安装python 3.3。

Since py33 has been phased out, you may soon get frustrated, due to lack of pre-built binary package, lxml, pyzmq etc all needs to be built from source. If you need any binary module, make sure you have a correctly set up compiler.

由于py33已经被淘汰,您可能很快就会感到沮丧,因为缺少预先构建的二进制包、lxml、pyzmq等所有需要从源代码中构建。如果您需要任何二进制模块,请确保您有一个正确设置的编译器。

#2


0  

Make a copy of the python34.dll file in c:\windows\system32 and name the copy python33.dll

复制python34。在c:\windows\system32中使用dll文件并命名为python33dll。

The create language plpython3u should then work without a problem.

创建语言plpython3u应该在没有问题的情况下工作。

#3


0  

This may be helpful, I have struggled a lot with this. For me only worked when I installed the right version of python and added paths to environment variables. I am not sure if python 3.4.0 would be the right version for PostgreSQL Server 9.6.0 but it worked fine with PostgreSQL Server 10.0.

这可能是有帮助的,我在这方面做了很多努力。对于我来说,只有当我安装了正确的python版本并添加了环境变量的路径时,才会起作用。我不确定python 3.4.0是否是PostgreSQL Server 9.6.0的正确版本,但它在PostgreSQL Server 10.0上运行良好。

Try version python-3.4.0.amd64 for windows 64bit or other versions from this Python 3.4.0 downloads Link

尝试python-3.4.0版本。amd64用于windows 64位或其他版本的Python 3.4.0下载链接。

Environment variables to add:

添加环境变量:

C:\Python34\Scripts C:\Python34\

C:\ Python34 \脚本C:\ Python34 \

#1


0  

plpython3.dll in the official package is built against python 3.3, not python 3.4. What it expect is python33.dll in system32 folder. You need to install python 3.3 for your system.

plpython3。官方包中的dll是针对python 3.3构建的,而不是python 3.4。它所期望的是python33。dll system32系统文件夹中。您需要为系统安装python 3.3。

Since py33 has been phased out, you may soon get frustrated, due to lack of pre-built binary package, lxml, pyzmq etc all needs to be built from source. If you need any binary module, make sure you have a correctly set up compiler.

由于py33已经被淘汰,您可能很快就会感到沮丧,因为缺少预先构建的二进制包、lxml、pyzmq等所有需要从源代码中构建。如果您需要任何二进制模块,请确保您有一个正确设置的编译器。

#2


0  

Make a copy of the python34.dll file in c:\windows\system32 and name the copy python33.dll

复制python34。在c:\windows\system32中使用dll文件并命名为python33dll。

The create language plpython3u should then work without a problem.

创建语言plpython3u应该在没有问题的情况下工作。

#3


0  

This may be helpful, I have struggled a lot with this. For me only worked when I installed the right version of python and added paths to environment variables. I am not sure if python 3.4.0 would be the right version for PostgreSQL Server 9.6.0 but it worked fine with PostgreSQL Server 10.0.

这可能是有帮助的,我在这方面做了很多努力。对于我来说,只有当我安装了正确的python版本并添加了环境变量的路径时,才会起作用。我不确定python 3.4.0是否是PostgreSQL Server 9.6.0的正确版本,但它在PostgreSQL Server 10.0上运行良好。

Try version python-3.4.0.amd64 for windows 64bit or other versions from this Python 3.4.0 downloads Link

尝试python-3.4.0版本。amd64用于windows 64位或其他版本的Python 3.4.0下载链接。

Environment variables to add:

添加环境变量:

C:\Python34\Scripts C:\Python34\

C:\ Python34 \脚本C:\ Python34 \