DLL load Error

60 views
Skip to first unread message

Lee

unread,
Jun 4, 2009, 10:54:55 AM6/4/09
to Orlando Python Users Group
First, I am very new to Python and haven't coded in a long time.
That being said, I am trying to use both Python and PostgreSQL. I
have installed PostgreSQL 8.2, Python 2.5 and finally PyGreSQL 4.0.
I have verified that the versions match. Installation runs w/o
errors. My problem is is when I execute my program. I get the
follwing message:

from _pg import *
ImportError: DLL load failed: The specified module could not be
found.

From my research it seems that I should have _pg.dll in the folder C:
\Program Files\Python25\lib\site-packages\, but it isn't there.

I have uninstalled everything and reinstalled verious versions. Can
you all help?

Does this point to a larger issue or would just providing me the dll
fix it?

Thanks in advance...

Chad MILLER

unread,
Jun 4, 2009, 11:39:48 AM6/4/09
to orlan...@googlegroups.com
On Thu, Jun 4, 2009 at 10:54, Lee <lee....@gmail.com> wrote:

First, I am very new to Python and haven't coded in a long time.
That being said, I am trying to use both Python and PostgreSQL.   I
have installed PostgreSQL 8.2, Python 2.5 and finally PyGreSQL 4.0.
I have verified that the versions match.   Installation runs w/o
errors.   My problem is is when I execute my program.   I get the
follwing message:

    from _pg import *
    ImportError: DLL load failed: The specified module could not be
found.


Hey Lee.  The interactive interpreter is wonderful, and you can probably use it to find the problem.  At a command prompt, just run python (dot-exe?  something.).  Then,

>>> import sys
>>> sys.path

This should show where Python is looking for modules.  If the locations don't include where pg.py, pg/, or _pg is, then that's the reason it can't find it.


From my research it seems that I should have _pg.dll in the folder  C:
\Program Files\Python25\lib\site-packages\, but it isn't there.

Where is it?  That's the first thing to find out.

You can move pg, or you can append its location before you import.

>>> sys.path.append(r"foo")
>>> import pg

 I hope this helps,

- chad
Reply all
Reply to author
Forward
0 new messages