pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: PEDRO PABLO SEVERIN HONORATO <ppseverin@miuandes.cl>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help with plpython3u
Date: Wed, 10 Jun 2020 10:44:31 -0700
Message-ID: <d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com> (raw)
In-Reply-To: <CAB2K=JPjaE4=K--_WG=kJSkBjfqSUTnk_-x0LSW=aczfaw=FJw@mail.gmail.com>
References: <CAB2K=JPRjrR6B5c=Vi8h0B8c4Wt=Y2wLRaita0dx2j4j7-n4aQ@mail.gmail.com>
	<630c303b-1c82-90dc-b602-54e461335fc6@aklaver.com>
	<CAB2K=JNLm1xkqZgtmTD1d-gbfjGTknxLRfK6Se4YbruOch-3rw@mail.gmail.com>
	<a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com>
	<CAB2K=JM+Ch_XiKP-gEu0as5UQ=QpZpQtHK6RVhDu9tROD+Q_1w@mail.gmail.com>
	<e9067956-48b0-2d49-5eb8-eb9dc644d194@aklaver.com>
	<CAB2K=JPce=+SRfetfWCLTRmhZhvLCq_aeNU9RWkVDAZamQnaAA@mail.gmail.com>
	<d63a1aeb-1a24-179a-2f95-914284eac85b@aklaver.com>
	<CAB2K=JPem1Wk-6iegkcWy9ZQL9=ZQHTdC9EJLLrf+dJ3ZeZCWA@mail.gmail.com>
	<13c85ed6-43ae-76e3-058d-97ccc435e96f@aklaver.com>
	<CAB2K=JM9ZuqQ+-Zi-M0cupR_M1OD5YzHRwT23zmgWguNFUJLMg@mail.gmail.com>
	<dfe845e0-4d04-db6d-988b-461bcd4f254a@aklaver.com>
	<CAB2K=JOT=UDaKOLevoJaA68iW+YmJv5BkN+5TuCZEuQ2Du3icQ@mail.gmail.com>
	<36efd504-84ac-6190-0d63-a95ffe855c56@aklaver.com>
	<CAB2K=JOy4C9EZ7m6ms5vp3HD4Rix6yYKAc9b_pYnvWLwg7CFsQ@mail.gmail.com>
	<CAB2K=JPjaE4=K--_WG=kJSkBjfqSUTnk_-x0LSW=aczfaw=FJw@mail.gmail.com>

On 6/10/20 10:39 AM, PEDRO PABLO SEVERIN HONORATO wrote:
> I'm sorry, when I try to create a plpython3u function, the database 
> tells me:
> 
> "*ERROR: could not load library "C:/Program
> Files/PostgreSQL/12/lib/plpython3.dll": The specified module could not
> be found. SQL state: 58P01*"
> 
> If I try to execute the function, then the database crashes.

Alright I'm going to have to review where we are at. That will not 
happen for a bit, so hang on.

> 
> El mié., 10 jun. 2020 a las 13:36, PEDRO PABLO SEVERIN HONORATO 
> (<ppseverin@miuandes.cl <mailto:ppseverin@miuandes.cl>>) escribió:
> 
>     I just think it would make your life easier to reduce the number of
>     Python installs you have. If I'm keeping track correctly you now have:
> 
>     1) Anaconda Python
> 
>     2) OS system Python
> 
>     3) EDB Python.
> 
>     The OS is windows, and afaik python is not included in windows, so
>     it would be just Anaconda python and EDB python.
> 
>     What happens if you try to create a plpythonu3u function in the
>     database?
> 
>     The database crashes and tells me "*Connection to the server has
>     been lost.*"
> 
>     El mié., 10 jun. 2020 a las 13:12, Adrian Klaver
>     (<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>)
>     escribió:
> 
>         On 6/10/20 9:57 AM, PEDRO PABLO SEVERIN HONORATO wrote:
>          > Alright. Before we go any further it would be best to
>         determine what
>          > your needs are. So:
>          >
>          > 1) Did you install Anaconda just to get Python or for the
>         science data
>          > set of libraries it provides?
>          >
>          > A: For the data science set of libraries. Also, it helps to keep
>          > libraries updated.
>          >
>          > 2) Do you need the system Python you installed for anything that
>          > Anaconda does not provide?
>          >
>          > A: I don't know if I understood well this question, but I
>         think the
>          > answer is no. Anaconda does provide almost all the libraries
>         I need. I
>          > just installed a couple more (like talib, tensorflow, keras,
>         psycopg2,
>          > etc) and created some libraries of my own.
> 
>         Those libraries are available from Anaconda:
> 
>         https://docs.anaconda.com/anaconda/packages/py3.7_win-64/
> 
>         or from AnacondaCloud:
> 
>         https://anaconda.org/
> 
>         I just think it would make your life easier to reduce the number of
>         Python installs you have. If I'm keeping track correctly you now
>         have:
> 
>         1) Anaconda Python
> 
>         2) OS system Python
> 
>         3) EDB Python.
> 
> 
>         What happens if you try to create a plpythonu3u function in the
>         database?
> 
> 
>          >
>          > 3) What are you planning to do with plpython3u?
>          >
>          > A: I'm planning to create some functions using python
>         language to
>          > process data that is stored in real time in the database and
>         then use
>          > them as triggers. I would like to be able to import some
>         libraries that
>          > I have in python to do it. Some of the functions are fourier
>         and wavelet
>          > transforms. If I can't import the library, then I'll have to
>         code the
>          > full function, but it's easier (for me) to code them in
>         python language
>          > rather than sql language.
>          >
>          > El mié., 10 jun. 2020 a las 12:17, Adrian Klaver
>          > (<adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>>) escribió:
>          >
>          >     On 6/10/20 8:25 AM, PEDRO PABLO SEVERIN HONORATO wrote:
>          >      > Just to be clear those where instructions from here,
>         correct?:
>          >      >
>          >      >
>          >
>         https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/user-guides/language-pack-guide...
>          >      >
>          >      > Yes. When I did that I could execute python functions
>         and create the
>          >      > extension in postgres without problem, but later I
>         realized that
>          >     doing
>          >      > this will create the other problem with anaconda.
>          >      >
>          >      > So when you did the Anaconda install:
>          >      >
>          >      > https://docs.anaconda.com/anaconda/install/windows/
>          >      >
>          >      > What did you check for the Advanced options in Step 8?
>          >      >
>          >      > I left the first one unchecked and the second one
>         checked, which
>          >     is the
>          >      > default settings.
>          >      >
>          >
>          >     Alright. Before we go any further it would be best to
>         determine what
>          >     your needs are. So:
>          >
>          >     1) Did you install Anaconda just to get Python or for the
>         science data
>          >     set of libraries it provides?
>          >
>          >     2) Do you need the system Python you installed for
>         anything that
>          >     Anaconda does not provide?
>          >
>          >     3) What are you planning to do with plpython3u?
>          >
>          >
>          >     --
>          >     Adrian Klaver
>          > adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>
>          >
> 
> 
>         -- 
>         Adrian Klaver
>         adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (21+ messages)  latest in thread

Message-ID: <d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com>
Permalink:  ../d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com/
Also on:    postgresql.org/message-id/d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ppseverin@miuandes.cl
  Subject: Re: Help with plpython3u
  In-Reply-To: <d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com>
  References: <CAB2K=JPRjrR6B5c=Vi8h0B8c4Wt=Y2wLRaita0dx2j4j7-n4aQ@mail.gmail.com> <CAB2K=JNLm1xkqZgtmTD1d-gbfjGTknxLRfK6Se4YbruOch-3rw@mail.gmail.com> <a4b58076-be83-77c9-fa66-0fd6f47c27d3@aklaver.com> <CAB2K=JM+Ch_XiKP-gEu0as5UQ=QpZpQtHK6RVhDu9tROD+Q_1w@mail.gmail.com> <e9067956-48b0-2d49-5eb8-eb9dc644d194@aklaver.com> <CAB2K=JPce=+SRfetfWCLTRmhZhvLCq_aeNU9RWkVDAZamQnaAA@mail.gmail.com> <d63a1aeb-1a24-179a-2f95-914284eac85b@aklaver.com> <CAB2K=JPem1Wk-6iegkcWy9ZQL9=ZQHTdC9EJLLrf+dJ3ZeZCWA@mail.gmail.com> <13c85ed6-43ae-76e3-058d-97ccc435e96f@aklaver.com> <CAB2K=JM9ZuqQ+-Zi-M0cupR_M1OD5YzHRwT23zmgWguNFUJLMg@mail.gmail.com> <dfe845e0-4d04-db6d-988b-461bcd4f254a@aklaver.com> <CAB2K=JOT=UDaKOLevoJaA68iW+YmJv5BkN+5TuCZEuQ2Du3icQ@mail.gmail.com> <36efd504-84ac-6190-0d63-a95ffe855c56@aklaver.com> <CAB2K=JOy4C9EZ7m6ms5vp3HD4Rix6yYKAc9b_pYnvWLwg7CFsQ@mail.gmail.com> <CAB2K=JPjaE4=K--_WG=kJSkBjfqSUTnk_-x0LSW=aczfaw=FJw@mail.gmail.com> <d52ae57f-3da8-1f39-8cd3-09c1dcb2b908@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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