Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ImportError: DLL load failed: The specified module could not be found.

#31

Submitted by: ellonweb

I get this error when my project tries to import psycopg.
ImportError: DLL load failed: The specified module could not be found.

It traces back to this:
File "C:\Python26\lib\site-packages\psycopg2\init.py", line 69, in
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID

It's worth noting that this works fine from a python prompt, this error only occurs when used with Apache/mod_wsgi. It also works fine under Django's test server.

The files are all there, it's all on my Python path (otherwise I'd get a different type of import error). All the permissions are fine (I can install an older version of psycopg in place and it works fine).

I realize that this isn't necessarily a bug in psycopg but I've been unable to resolve the problem from speaking to people in #python or #django on freenode, and I've tried everything I can find on google! Was hoping you might be able to shed some more light on the issue.

psycopg 2.0.14 works fine. 2.2.1 and 2.3.2 both have this problem.

Running Windows, Python 2.6.5, Postgre 8.4.4, mod_wsgi 3.3, Django 1.2.3, Apache 2.2.17. I have a friend running my code with a similar setup and they have the same error.

Your help would be much appreciated.

Reported by Psycopg website · December 23rd, 2010 @ 12:10 AM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid
    • Tag changed from rel-2.2.2 to apache, rel-2.2.2, windows

    I think this is a duplicate of #20 Building psycopg2 for Python 2.7 on Windows XP.

    There is some weird dll interaction. Ticket #20 Building psycopg2 for Python 2.7 on Windows XP contains more informations, but not a definitive answer. I've reported the problem to Jason.

    Looking around for some dll wizard...

    December 23rd, 2010 @ 12:55 AM