467,146 Members | 990 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

dll load failed?..pls help

i'm new to python programming..and i'm studying into one of its tutorials..I used pygres for its interface to the postgresql database..the problem is when i tried to run "import _pg" it has an error like this:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import pg
File "C:\Python24\Lib\site-packages\pg.py", line 21, in -toplevel-
from _pg import *
ImportError: DLL load failed: The specified module could not be found.

ive checked the installation directory and i dont see any problem there..i couldnt figure out what is really the problem here..pls help..
Sep 18 '06 #1
  • viewed: 11381
Share:
5 Replies
I am in the same spot you were in. Did you ever get an answer or figure it out?

Thanks in advance.

i'm new to python programming..and i'm studying into one of its tutorials..I used pygres for its interface to the postgresql database..the problem is when i tried to run "import _pg" it has an error like this:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import pg
File "C:\Python24\Lib\site-packages\pg.py", line 21, in -toplevel-
from _pg import *
ImportError: DLL load failed: The specified module could not be found.

ive checked the installation directory and i dont see any problem there..i couldnt figure out what is really the problem here..pls help..
Jan 19 '08 #2
actually im using pygresql also before going to the dll, copy the dll found in the postgresql library ahm it is found in the program files in c then postgresql/8.1/lib dn copy all the dll there then paste to the python directory where the pg module is found
Jan 21 '08 #3
Thanks for the help Kenneth. I copied all the DLLs in the PostgreSQL\8.2\lib (there wasn't an '_pg.dll') folder to Python\Lib\site-packages (the only 'pg.*' files were pg.pyc & pg.pyo).

I tried to run my code again and got the same message

I'm an old school coder and DBA, but completely new OO and Python, so pardon me if I am being dense...

Also, I opened pg.pyc and saw a note which said it included the _pg module, so I added an 'import pg' stmt into my code. I ran and had the same error with that module.

This is a little frustrating.
Jan 21 '08 #4
try using python 2.5 and the pygresql appropriate for python 2.5. this works for me.
Feb 18 '08 #5
i think _pg.dll is already in the nstaller of pygresql. i have _pg.dll found in my python25/lib/site_packages directory
Feb 18 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by jmdeschamps | last post: by
reply views Thread by Simon | last post: by
1 post views Thread by Daniel | last post: by
1 post views Thread by rockdale | last post: by
4 posts views Thread by gwise@pressganey.com | last post: by
reply views Thread by bbansi_1982@yahoo.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.