Обсуждение: BUG #5641: Can not create any python language
The following bug has been logged online: Bug reference: 5641 Logged by: Ron Park Email address: rparkjr@gmail.com PostgreSQL version: 9.0 Operating system: Windows 7 professional 64 bit Description: Can not create any python language Details: when trying to create plpythonu ERROR: could not find function "plpython_call_handler" in file "C:/Program Files/PostgreSQL/9.0/lib/plpython.dll" when trying to create plpython2u or plpython3u I get ERROR: could not access file "$libdir/plpython2": No such file or directory ERROR: could not access file "$libdir/plpython3": No such file or directory I have python2.6, python3.1, python3.2 all installed (64 bit). All are in the path variable. used 9.0 MSI from enterprise to install postgresql 9.0 I have been running and using the 8.xx ones on windows 32 bit and ubuntu for 6 years and have been able to get python to behave well on both systems. But I am at a loss here.. Looks like there is a bug in the plpython.dll missing the call handler??? Not sure
Hi, Can you share the postgresql log file, when you tried to create the python language on PG 9.0? -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA On Fri, Sep 3, 2010 at 3:03 AM, Ron Park <rparkjr@gmail.com> wrote: > > The following bug has been logged online: > > Bug reference: 5641 > Logged by: Ron Park > Email address: rparkjr@gmail.com > PostgreSQL version: 9.0 > Operating system: Windows 7 professional 64 bit > Description: Can not create any python language > Details: > > when trying to create plpythonu > > ERROR: could not find function "plpython_call_handler" in file "C:/Program > Files/PostgreSQL/9.0/lib/plpython.dll" > > > when trying to create plpython2u or plpython3u I get > ERROR: could not access file "$libdir/plpython2": No such file or > directory > > ERROR: could not access file "$libdir/plpython3": No such file or > directory > > > I have python2.6, python3.1, python3.2 all installed (64 bit). All are in > the path variable. > > used 9.0 MSI from enterprise to install postgresql 9.0 > > I have been running and using the 8.xx ones on windows 32 bit and ubuntu > for > 6 years and have been able to get python to behave well on both systems. > But I am at a loss here.. Looks like there is a bug in the plpython.dll > missing the call handler??? Not sure > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
Hi Ron, I am able to reproduce the issue on my side.. Thanks for the report. I found that - plpython.dll is not exporting any plpython_call_handler function, but plpython3_call_handler. For the work around, you can follow this link: 1) Go to PostgreSQL lib directory i.e. C:\Program Files\PostgreSQL\9.0\lib 2) Copy plpython.dll as plpython3.dll in the same directory. Now, try to create the plpython3u language in PostgreSQL. i.e. CREATE LANGUAGE plpython3u; This is just a temporary solution and I wish - this solves the problem for you. We will come up with a better solution soon. -- *Thanks & Regards,* * * *Ashesh Vashi* *EnterpriseDB INDIA:* Enterprise Postgres Company<http://www.enterprisedb.com> On Thu, Sep 9, 2010 at 3:25 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com>wrote: > Hi, > > Can you share the postgresql log file, when you tried to create the python > language on PG 9.0? > > -- > Thanks & Regards, > > Ashesh Vashi > EnterpriseDB INDIA > > > On Fri, Sep 3, 2010 at 3:03 AM, Ron Park <rparkjr@gmail.com> wrote: > >> >> The following bug has been logged online: >> >> Bug reference: 5641 >> Logged by: Ron Park >> Email address: rparkjr@gmail.com >> PostgreSQL version: 9.0 >> Operating system: Windows 7 professional 64 bit >> Description: Can not create any python language >> Details: >> >> when trying to create plpythonu >> >> ERROR: could not find function "plpython_call_handler" in file >> "C:/Program >> Files/PostgreSQL/9.0/lib/plpython.dll" >> >> >> when trying to create plpython2u or plpython3u I get >> ERROR: could not access file "$libdir/plpython2": No such file or >> directory >> >> ERROR: could not access file "$libdir/plpython3": No such file or >> directory >> >> >> I have python2.6, python3.1, python3.2 all installed (64 bit). All are in >> the path variable. >> >> used 9.0 MSI from enterprise to install postgresql 9.0 >> >> I have been running and using the 8.xx ones on windows 32 bit and ubuntu >> for >> 6 years and have been able to get python to behave well on both systems. >> But I am at a loss here.. Looks like there is a bug in the plpython.dll >> missing the call handler??? Not sure >> >> -- >> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-bugs >> > >
Hi, I'm facing the same issue in the same environment and the solution given by Ashesh Vashi is not working. :( Once I have copied plpython.dll as plpython3.dll, I still can't create the language plpython3u for a database. Is there another work around? Thanks, Alban. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330444.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
Hi Alban, Can you please open the plpython.dll (now, plpython3.dll) in the dependency walker and check if it satisfies all the required dlls? You can find the dependency walker @ dependencywalker.com. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi> On Thu, Jan 6, 2011 at 7:38 PM, areveille <areveille@mobigis.fr> wrote: > > Hi, > > I'm facing the same issue in the same environment and the solution given by > Ashesh Vashi is not working. :( > Once I have copied plpython.dll as plpython3.dll, I still can't create the > language plpython3u for a database. > > Is there another work around? > > Thanks, > > Alban. > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330444.html > Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
On Thu, Jan 6, 2011 at 9:08 AM, areveille <areveille@mobigis.fr> wrote: > I'm facing the same issue in the same environment and the solution given by > Ashesh Vashi is not working. :( > Once I have copied plpython.dll as plpython3.dll, I still can't create the > language plpython3u for a database. I guess the obvious question is - what happens when you try it? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
It shows you all the dependent dlls (present or missing) in it. It also shows the exported functions by that particular dll. That gives you idea, if something is wrong with your environment or some dlls are missing. You can check more details on http://dependencywalker.com/ (NOTE: bottom of the page of this link shows you the screen-shot of dependency walker.) -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi> On Thu, Jan 6, 2011 at 8:07 PM, Robert Haas <robertmhaas@gmail.com> wrote: > On Thu, Jan 6, 2011 at 9:08 AM, areveille <areveille@mobigis.fr> wrote: > > I'm facing the same issue in the same environment and the solution given > by > > Ashesh Vashi is not working. :( > > Once I have copied plpython.dll as plpython3.dll, I still can't create > the > > language plpython3u for a database. > > I guess the obvious question is - what happens when you try it? > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
Hi, I used dependency walker in order to see which dependencies could be unsatified in plpython.dll and indeed some of them were missing : - python26.dll (I had python2.7 installed but obviously it requires 2.6.) - some .dll that are in the bin folder of posgreSQL So I installed python 2.6 and copy/paste the other missing dlls In the end, when I use dependency walker, plpython.dll still have a warning : "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." Here is a screen shot of the result in dependency walker : http://postgresql.1045698.n5.nabble.com/file/n3330551/depWalker.png depWalker.png I still can't create the language. Thanks, Alban. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330551.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
The result is still the same (means "ERREUR: n'a pas pu charger la biblioth=C3=A8que =C2=AB C:/Program Files/PostgreSQL/9.0/lib/plpython3.dll = =C2=BB : unknown error 126" =3D Can't load C:/Program Files/PostgreSQL/9.0/lib/plpython3.dll --=20 View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5= 641-Can-not-create-any-python-language-tp2801518p3330556.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
And, make sure you create the plpythonu language not plpython3u. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi> On Thu, Jan 6, 2011 at 8:46 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com>wrote: > This warning will be there for any dlls. > So - you can ignore them. > > If you have renamed the plpython.dll to plpython3.dll, then please revert > it back to original one. > And, then try to create the language. > > > -- > Thanks & Regards, > > Ashesh Vashi > EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com> > > > > *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi> > > > On Thu, Jan 6, 2011 at 8:42 PM, areveille <areveille@mobigis.fr> wrote: > >> >> Hi, >> >> I used dependency walker in order to see which dependencies could be >> unsatified in plpython.dll and indeed some of them were missing : >> - python26.dll (I had python2.7 installed but obviously it requires 2.6.) >> - some .dll that are in the bin folder of posgreSQL >> >> So I installed python 2.6 and copy/paste the other missing dlls >> >> In the end, when I use dependency walker, plpython.dll still have a >> warning >> : >> "Warning: At least one module has an unresolved import due to a missing >> export function in a delay-load dependent module." >> Here is a screen shot of the result in dependency walker : >> http://postgresql.1045698.n5.nabble.com/file/n3330551/depWalker.png >> depWalker.png >> >> I still can't create the language. >> >> Thanks, >> >> Alban. >> -- >> View this message in context: >> http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330551.html >> Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. >> >> -- >> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-bugs >> > >
This warning will be there for any dlls. So - you can ignore them. If you have renamed the plpython.dll to plpython3.dll, then please revert it back to original one. And, then try to create the language. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi> On Thu, Jan 6, 2011 at 8:42 PM, areveille <areveille@mobigis.fr> wrote: > > Hi, > > I used dependency walker in order to see which dependencies could be > unsatified in plpython.dll and indeed some of them were missing : > - python26.dll (I had python2.7 installed but obviously it requires 2.6.) > - some .dll that are in the bin folder of posgreSQL > > So I installed python 2.6 and copy/paste the other missing dlls > > In the end, when I use dependency walker, plpython.dll still have a > warning > : > "Warning: At least one module has an unresolved import due to a missing > export function in a delay-load dependent module." > Here is a screen shot of the result in dependency walker : > http://postgresql.1045698.n5.nabble.com/file/n3330551/depWalker.png > depWalker.png > > I still can't create the language. > > Thanks, > > Alban. > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330551.html > Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
In fact I always had plpython.dll since I duplicated the file (one named plpython.dll and the other plpython3.dll). Anyways, now I have deleted plpython3.dll (so I just have plpython.dll) and "create language plpython;" answers : ERREUR: n'a pas pu charger la biblioth=C3=A8que =C2=AB C:/Program Files/PostgreSQL/9.0/lib/plpython.dll = =C2=BB : unknown error 126 which means "can't load C:/Program Files/PostgreSQL/9.0/lib/plpython.dll" Thanks for your time, Alban. --=20 View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5= 641-Can-not-create-any-python-language-tp2801518p3330575.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
Are the python binaries in your system level PATH environment? If not, you need to make sure the bin folder of python should be in your system level PATH variable. Check this link for the reference: http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-p= ath-in-windows-7.aspx Then - you need to restart your postgres service. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.c= om> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshv= ashi> On Thu, Jan 6, 2011 at 8:53 PM, areveille <areveille@mobigis.fr> wrote: > > In fact I always had plpython.dll since I duplicated the file (one named > plpython.dll and the other plpython3.dll). > > Anyways, now I have deleted plpython3.dll (so I just have plpython.dll) a= nd > "create language plpython;" answers : ERREUR: n'a pas pu charger la > biblioth=E8que =AB C:/Program Files/PostgreSQL/9.0/lib/plpython.dll =BB := unknown > error 126 which means "can't load C:/Program > Files/PostgreSQL/9.0/lib/plpython.dll" > > Thanks for your time, > > Alban. > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-pytho= n-language-tp2801518p3330575.html > Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
This was the final step : it worked out. Thanks for your time, your understandable explanations! Alban, -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5641-Can-not-create-any-python-language-tp2801518p3330632.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.