Re: Help me in error of importing psycopg2 in python
"Massa, Harald Armin" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Could be a missing Microsoft Visual C++ 2005 Redistributable Package (x86)find documentation: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/36971526-95f3-4a9f-a601-1843c86332c1 check out this: http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en best wishes, Harald On Thu, Aug 27, 2009 at 5:24 PM, Vu Hong Thuan <[email protected]> wrote: > Thank Harald, > But after installing psycopg2 for windows binaries, i get the following > error > Before installing, _psycopg.pyd depends libpg.dll... I've checked the > permission to these files, all are ok. But i still get the error. > I checked the dependences of the file _psycopg.pyd, it doesn't depend any > .dll > Would you have any suggestion? > >>> import psycopg2 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "C:\Python26\lib\site-packages\psycopg2\__init__.py", line 60, in > <module > > > from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID > ImportError: DLL load failed: This application has failed to start because > the a > pplication configuration is incorrect. Reinstalling the application may fix > this > problem. > > > > 2009/8/27 Massa, Harald Armin <[email protected]> > > Vu, >> >> you should try using the psycopg2 win32 binaries from >> >> http://www.stickpeople.com/projects/python/win-psycopg/ >> >> a rough guess is: you did not choose to statically bind all dependencies >> within your built psycopg2-module, and a referenced .dll is missing. >> >> Just take the binaries and enjoy, >> >> best wishes, >> >> Harald >> >> >> >> On Thu, Aug 27, 2009 at 4:59 PM, Vu Hong Thuan <[email protected]> wrote: >> >>> Here is my error, anyone help me >>> >>> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit >>> (Intel)] on >>> win32 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import psycopg2 >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "C:\Python26\lib\site-packages\psycopg2\__init__.py", line 60, in >>> <module >>> > >>> from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID >>> ImportError: DLL load failed: The specified procedure could not be found. >>> >>> import psycopg2 >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "C:\Python26\lib\site-packages\psycopg2\__init__.py", line 55, in >>> <module >>> > >>> from psycopg2 import tz >>> ImportError: cannot import name tz >>> >>> >>> >>> 2009/8/27 Vu Hong Thuan <[email protected]> >>> >>>> I've test in postgres 8.3, 8.2, I get the same error, >>>> >>>> 2009/8/27 Vu Hong Thuan <[email protected]> >>>> >>>> Yes, Postgres 8.4, >>>>> Have you ever get this error when using psycopg2 ? >>>>> >>>>> 2009/8/27 Karsten Hilbert <[email protected]> >>>>> >>>>> On Thu, Aug 27, 2009 at 04:47:31PM +0700, Vu Hong Thuan wrote: >>>>>> >>>>>> > I've installed python 2.6.2 on windows and Postgres 4.0 >>>>>> >>>>>> Certainly not. 8.4, perhaps ? >>>>>> >>>>>> Karsten >>>>>> -- >>>>>> GPG key ID E4071346 @ wwwkeys.pgp.net >>>>>> E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 >>>>>> _______________________________________________ >>>>>> Psycopg mailing list >>>>>> Psycopg-IAPFreCvJWPBWskQ1e/[email protected] >>>>>> http://lists.initd.org/mailman/listinfo/psycopg >>>>>> >>>>> >>>>> >>>> >>> >>> _______________________________________________ >>> Psycopg mailing list >>> Psycopg-IAPFreCvJWPBWskQ1e/[email protected] >>> http://lists.initd.org/mailman/listinfo/psycopg >>> >>> >> >> >> -- >> GHUM Harald Massa >> persuadere et programmare >> Harald Armin Massa >> Spielberger Straße 49 >> 70435 Stuttgart >> 0173/9409607 >> no fx, no carrier pigeon >> - >> LASIK good, steroids bad? >> > > -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 no fx, no carrier pigeon - LASIK good, steroids bad? _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg