<font class="fixed_width" face="Courier, Monospaced">I'm having trouble using Py2exe with a PyQT-based python project. Or possibly I'm having a problem with PyQT and Py2exe makes it apparent. Whichever it is, I run into trouble with importing QtCore and QtGui. The error reported is:
<br> </font><p><font class="fixed_width" face="Courier, Monospaced"> Traceback (most recent call last): <br> File "xmlEdit.py", line 3, in ? <br> File "PyQt4\QtCore.pyc", line 12, in ? <br> File "PyQt4\QtCore.pyc", line 10, in __load
<br> ImportError: DLL load failed: Invalid access to memory location. <br> </font></p><p><font class="fixed_width" face="Courier, Monospaced">Line 10 is the call to imp.load_dynamic to import QtCore.pyd, which is included in the dist folder. Curiously, this is the same error I get when I input "from PyQt4 import QtCore, QtGui" into IDLE. I'm not quite sure what the error means, only that it isn't that the file is not found (a Module Not Found error occurs if I remove
QtCore.pyd).<br> </font></p><font class="fixed_width" face="Courier, Monospaced">It run just fine from the command line. Can anyone shed some light on this? QT version is 4.1.3. Python is 2.4.3 and PyQT is 4.0.1. </font>