PyGreSQL, DLL search path, IDLE versus python command line

h112211 at gmail.com h112211 at gmail.com
Tue Aug 1 08:30:09 EDT 2006


Hi all,

I'm using the Windows version of Python 2.4.3 and everything worked
okay until I installed PyGreSQL. Well, in fact the installation went
fine, but when I try to run my script from IDLE I get:

Traceback (most recent call last):
  File "<pathtomyscript>\main.py", line 3, in -toplevel-
    import pgdb
  File "C:\Program Files\Python24\Lib\site-packages\pgdb.py", line 69,
in -toplevel-
    from _pg import *
ImportError: DLL load failed: The specified module could not be found.

A quick surfing session suggested that this happens because libpq.dll
cannot be found.

However, if I start the Python command line (from the installer-created
start menu shortcut) I can "import pgdb" without any errors whatsoever.

And yes, the dir containing libpq.dll is in my windows path.

Anyone know why the the command line finds everything but IDLE doesn't?




More information about the Python-list mailing list