pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedError creating plpython3u extension
6+ messages / 3 participants
[nested] [flat]
* Error creating plpython3u extension
@ 2018-05-08 20:28 Bruce Harold <bharold@esri.com>
2018-05-08 22:38 ` Re: Error creating plpython3u extension Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-08 22:38 ` Re: Error creating plpython3u extension Jeff Peck <peck.jeff@gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Bruce Harold @ 2018-05-08 20:28 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi
I have PostgreSQL 10 on Windows 10 and the EDB language pack X64 for Python 3.4 etc.
I edited the system environment variables:
PYTHONPATH = C:\edb\languagepack-10\x64\Python-3.4
Added C:\edb\LanguagePack-10\x64\Python-3.4\bin to PATH
Creating the extension plpython3u errors:
ERROR: could not load library "C:/Program Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not be found
I have conda on the same machine with one Python 3.6 environment, I tried adding a Python 3.4 environment with conda but no luck there either.
Anyone have any experience enabling plpython3u in a conda environment?
Thanks
Bruce
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Error creating plpython3u extension
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
@ 2018-05-08 22:38 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-09 16:46 ` RE: Error creating plpython3u extension Bruce Harold <bharold@esri.com>
1 sibling, 1 reply; 6+ messages in thread
From: Adrian Klaver @ 2018-05-08 22:38 UTC (permalink / raw)
To: Bruce Harold <bharold@esri.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 05/08/2018 01:28 PM, Bruce Harold wrote:
> Hi
>
> I have PostgreSQL 10 on Windows 10 and the EDB language pack X64 for
> Python 3.4 etc.
>
> I edited the *system* environment variables:
According to this:
https://www.enterprisedb.com/docs/en/10.0/Language_Pack_v10/EDB_Postgres_Language_Pack_Guide.1.08.ht...
This:
>
> PYTHONPATH = C:\edb\languagepack-10\x64\Python-3.4
should be:
set PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4
>
> Added C:\edb\LanguagePack-10\x64\Python-3.4\bin to PATH
>
> Creating the extension plpython3u errors:
>
> ERROR: could not load library "C:/Program
> Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not
> be found
>
> I have conda on the same machine with one Python 3.6 environment, I
> tried adding a Python 3.4 environment with conda but no luck there either.
>
> Anyone have any experience enabling plpython3u in a conda environment?
>
> Thanks
>
> Bruce
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: Error creating plpython3u extension
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
2018-05-08 22:38 ` Re: Error creating plpython3u extension Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-05-09 16:46 ` Bruce Harold <bharold@esri.com>
2018-05-09 17:38 ` RE: Error creating plpython3u extension Bruce Harold <bharold@esri.com>
0 siblings, 1 reply; 6+ messages in thread
From: Bruce Harold @ 2018-05-09 16:46 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thank you Adrian and Jeff.
I made some progress and can extend databases with plpython3u.
Re. the edb doc, "C:\edb\LanguagePack-10\x64\Python-3.4\bin" does not exist, stripping 'bin' off the path is required.
Setting PYTHONHOME for the system is unfriendly to the rest of my python dependencies, so to make this specific to pg I edited the pgAdmin 4 shortcut to set the variable there, the shortcut target becomes:
C:\Windows\System32\cmd.exe /c "SET PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4 && START pgAdmin4.exe"
The "Start in" property does not change, the executable is found.
Whether or not this works across the server I guess I'll find out shortly, I'm a newbie doing a proof of concept so deployment isn't a concern.
Bruce
-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: Tuesday, May 8, 2018 3:38 PM
To: Bruce Harold <bharold@esri.com>; pgsql-general@lists.postgresql.org
Subject: Re: Error creating plpython3u extension
On 05/08/2018 01:28 PM, Bruce Harold wrote:
> Hi
>
> I have PostgreSQL 10 on Windows 10 and the EDB language pack X64 for
> Python 3.4 etc.
>
> I edited the *system* environment variables:
According to this:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.enterprisedb.com_docs_en_10.0_Language-5FPa...
This:
>
> PYTHONPATH = C:\edb\languagepack-10\x64\Python-3.4
should be:
set PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4
>
> Added C:\edb\LanguagePack-10\x64\Python-3.4\bin to PATH
>
> Creating the extension plpython3u errors:
>
> ERROR: could not load library "C:/Program
> Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not
> be found
>
> I have conda on the same machine with one Python 3.6 environment, I
> tried adding a Python 3.4 environment with conda but no luck there either.
>
> Anyone have any experience enabling plpython3u in a conda environment?
>
> Thanks
>
> Bruce
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: Error creating plpython3u extension
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
2018-05-08 22:38 ` Re: Error creating plpython3u extension Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-09 16:46 ` RE: Error creating plpython3u extension Bruce Harold <bharold@esri.com>
@ 2018-05-09 17:38 ` Bruce Harold <bharold@esri.com>
2018-05-09 23:20 ` Re: Error creating plpython3u extension Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 6+ messages in thread
From: Bruce Harold @ 2018-05-09 17:38 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
It seems my cheap hack doesn't work, the server connection breaks on CREATE FUNCTION unless PYTHONHOME is set for the system.
-----Original Message-----
From: Bruce Harold
Sent: Wednesday, May 9, 2018 9:46 AM
To: 'Adrian Klaver' <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org
Subject: RE: Error creating plpython3u extension
Thank you Adrian and Jeff.
I made some progress and can extend databases with plpython3u.
Re. the edb doc, "C:\edb\LanguagePack-10\x64\Python-3.4\bin" does not exist, stripping 'bin' off the path is required.
Setting PYTHONHOME for the system is unfriendly to the rest of my python dependencies, so to make this specific to pg I edited the pgAdmin 4 shortcut to set the variable there, the shortcut target becomes:
C:\Windows\System32\cmd.exe /c "SET PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4 && START pgAdmin4.exe"
The "Start in" property does not change, the executable is found.
Whether or not this works across the server I guess I'll find out shortly, I'm a newbie doing a proof of concept so deployment isn't a concern.
Bruce
-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: Tuesday, May 8, 2018 3:38 PM
To: Bruce Harold <bharold@esri.com>; pgsql-general@lists.postgresql.org
Subject: Re: Error creating plpython3u extension
On 05/08/2018 01:28 PM, Bruce Harold wrote:
> Hi
>
> I have PostgreSQL 10 on Windows 10 and the EDB language pack X64 for
> Python 3.4 etc.
>
> I edited the *system* environment variables:
According to this:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.enterprisedb.com_docs_en_10.0_Language-5FPa...
This:
>
> PYTHONPATH = C:\edb\languagepack-10\x64\Python-3.4
should be:
set PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4
>
> Added C:\edb\LanguagePack-10\x64\Python-3.4\bin to PATH
>
> Creating the extension plpython3u errors:
>
> ERROR: could not load library "C:/Program
> Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not
> be found
>
> I have conda on the same machine with one Python 3.6 environment, I
> tried adding a Python 3.4 environment with conda but no luck there either.
>
> Anyone have any experience enabling plpython3u in a conda environment?
>
> Thanks
>
> Bruce
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Error creating plpython3u extension
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
2018-05-08 22:38 ` Re: Error creating plpython3u extension Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-09 16:46 ` RE: Error creating plpython3u extension Bruce Harold <bharold@esri.com>
2018-05-09 17:38 ` RE: Error creating plpython3u extension Bruce Harold <bharold@esri.com>
@ 2018-05-09 23:20 ` Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Klaver @ 2018-05-09 23:20 UTC (permalink / raw)
To: Bruce Harold <bharold@esri.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 05/09/2018 10:38 AM, Bruce Harold wrote:
> It seems my cheap hack doesn't work, the server connection breaks on CREATE FUNCTION unless PYTHONHOME is set for the system.
Yeah, pretty sure the server is not looking at the environment that
pgAdmin4 is running in as that is not part of the core.
Not sure how to solve this. I don't run Windows enough anymore to offer
any suggestions. Maybe someone from EDB will chime in.
>
> -----Original Message-----
> From: Bruce Harold
> Sent: Wednesday, May 9, 2018 9:46 AM
> To: 'Adrian Klaver' <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org
> Subject: RE: Error creating plpython3u extension
>
> Thank you Adrian and Jeff.
>
> I made some progress and can extend databases with plpython3u.
>
> Re. the edb doc, "C:\edb\LanguagePack-10\x64\Python-3.4\bin" does not exist, stripping 'bin' off the path is required.
>
> Setting PYTHONHOME for the system is unfriendly to the rest of my python dependencies, so to make this specific to pg I edited the pgAdmin 4 shortcut to set the variable there, the shortcut target becomes:
>
> C:\Windows\System32\cmd.exe /c "SET PYTHONHOME=C:\edb\languagepack-10\x64\Python-3.4 && START pgAdmin4.exe"
>
> The "Start in" property does not change, the executable is found.
>
> Whether or not this works across the server I guess I'll find out shortly, I'm a newbie doing a proof of concept so deployment isn't a concern.
>
> Bruce
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Error creating plpython3u extension
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
@ 2018-05-08 22:38 ` Jeff Peck <peck.jeff@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Peck @ 2018-05-08 22:38 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 05/08/2018 03:28 PM, Bruce Harold wrote:
>
> Hi
>
> I have PostgreSQL 10 on Windows 10 and the EDB language pack X64 for
> Python 3.4 etc.
>
> I edited the *system* environment variables:
>
> PYTHONPATH = C:\edb\languagepack-10\x64\Python-3.4
>
> Added C:\edb\LanguagePack-10\x64\Python-3.4\bin to PATH
>
> Creating the extension plpython3u errors:
>
> ERROR: could not load library "C:/Program
> Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not
> be found
>
> I have conda on the same machine with one Python 3.6 environment, I
> tried adding a Python 3.4 environment with conda but no luck there either.
>
> Anyone have any experience enabling plpython3u in a conda environment?
>
> Thanks
>
> Bruce
>
Hey Bruce,
I suggest that you first check to see if the referenced file exists. If
yes, the next step is to go download a tool called Dependency Walker.
You will open that dll file in Dependency Walker, and it should tell you
if anything required is missing from your box. Most likely you just need
to install a specific Visual C++ Runtime Environment. If Dependency
Walker lists a DLL like MSVCRXXX.dll in the list, you should be able to
search for that and find the correct runtime environment pretty easily.
Good luck,
Jeff Peck
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-05-09 23:20 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 20:28 Error creating plpython3u extension Bruce Harold <bharold@esri.com>
2018-05-08 22:38 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-09 16:46 ` Bruce Harold <bharold@esri.com>
2018-05-09 17:38 ` Bruce Harold <bharold@esri.com>
2018-05-09 23:20 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-08 22:38 ` Jeff Peck <peck.jeff@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox