Tom,
O.K.,
I re-wrote my ./configure to start with
./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3/python.exe ... etc ...
Thanks that works right now.
checking for python... /c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3/python.exe
checking for Python distutils module... yes
checking Python configuration directory...
checking Python include directories... -Ic:/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3/include
checking how to link an embedded Python application... -L -lpython3.3
Maybe the docs should say, something similar to
"Full path name and file name of the XXX interpreter"?
https://www.postgresql.org/docs/9.5/static/install-procedure.html
I also ended up needing. . . .
1. A copy of python33.dll to be in the folder C:\Windows\System32.
(This 'location requirement' seems *stangely* hardcoded.)
2. pexports.exe ( that the mingw x86_64-6.2.0-release-posix-seh-rt_v5-rev0 does not have.)
I ended up attaching the 'PostgreSQL happy' Strawberry PERL distribution c_bin_directory
(that has pexports.exe ) to the end of my path.
set PATH=%PATH%;C:\Strawberry\c\bin
(But this guy know how to get pexports.exe directly)
MinGW: pexports for Windows DLLs
https://forbharat.wordpress.com/2010/12/30/mingw-pexports-for-windows-dlls/
I followed the instructions in here.
http://get.enterprisedb.com/docs/README-languagepack-950.txt
Then, I did.
create language plpython3u;
I followed the instructions in here.
https://www.postgresql.org/docs/9.5/static/plpython-funcs.html
Last, I did a very simple test.
postgres=# select pymax(5,3);
pymax
-------
5
(1 row)
Thanks,
Andre Mikulec
Andre_Mikulec@xxxxxxxxxxx
From: Tom Lane <tgl@xxxxxxxxxxxxx>
Sent: Thursday, October 20, 2016 10:03 AM To: Andre Mikulec Cc: pgsql-general@xxxxxxxxxxxxxx Subject: Re: configure PostgreSQL with the python: distutils module not found Andre Mikulec <andre_mikulec@xxxxxxxxxxx> writes:
> I am trying to configure PostgreSQL with the plpython language available. > Here is my ./configure line > $ ./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3 --with-python --with-includes=/c/EnterpriseDB/Lang Are you sure that that PYTHON specification actually points at a usable executable? > I am getting the error message. > checking for python... /c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3 > checking for Python distutils module... no > configure: error: distutils module not found The test that's failing is just if "${PYTHON}" -c 'import distutils' 2>&AS_MESSAGE_LOG_FD then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([distutils module not found]) fi so it seems pretty likely that the value of PYTHON you're forcing doesn't identify a usable Python. Looking into config.log to see what the stderr output of this test was might be informative. regards, tom lane |