Py2exe & (Py)QT4

Discussion in 'Python' started by shane.external@gmail.com, Jul 20, 2006.

  1. Guest

    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:

    Traceback (most recent call last):
    File "xmlEdit.py", line 3, in ?
    File "PyQt4\QtCore.pyc", line 12, in ?
    File "PyQt4\QtCore.pyc", line 10, in __load
    ImportError: DLL load failed: Invalid access to memory location.

    Line 10 is the import of 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, so I'm not even sure it's a
    Py2exe issue. 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).

    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.
     
    , Jul 20, 2006
    #1
    1. Advertisements

  2. David Boddie Guest

    wrote:
    > 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:
    >
    > Traceback (most recent call last):
    > File "xmlEdit.py", line 3, in ?
    > File "PyQt4\QtCore.pyc", line 12, in ?
    > File "PyQt4\QtCore.pyc", line 10, in __load
    > ImportError: DLL load failed: Invalid access to memory location.
    >
    > Line 10 is the import of 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, so I'm not even sure it's a
    > Py2exe issue. 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).


    I don't use Windows, so I can only guess at what the problem is.
    Maybe the libraries that QtCore.pyd depends on aren't available,
    or they are in a place that the import machinery doesn't know
    about.

    > 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.


    I can only suggest looking in the py2exe Wiki:

    http://starship.python.net/crew/theller/moin.cgi/Py2Exe

    I tried searching for similar report but only found this one

    http://groups.google.com/group/comp.lang.python/msg/75317974fd73ea88

    that might help you diagnose the problem.

    If you want to take this to a PyQt-related mailing list, visit

    http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

    David
     
    David Boddie, Jul 20, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. F. GEIGER
    Replies:
    0
    Views:
    1,185
    F. GEIGER
    Aug 16, 2004
  2. python
    Replies:
    3
    Views:
    2,438
    Simon Brunning
    May 22, 2006
  3. aljosa

    py2exe & qt4/qimage

    aljosa, Jun 1, 2006, in forum: Python
    Replies:
    1
    Views:
    737
    Serge Orlov
    Jun 1, 2006
  4. aljosa

    image lib & Qt4

    aljosa, Jun 1, 2006, in forum: Python
    Replies:
    11
    Views:
    1,475
    Fredrik Lundh
    Jun 3, 2006
  5. Marcpp

    Qt4 in ubuntu

    Marcpp, Apr 15, 2007, in forum: Python
    Replies:
    3
    Views:
    457
    Diez B. Roggisch
    Apr 16, 2007
  6. Ajith
    Replies:
    0
    Views:
    688
    Ajith
    May 2, 2007
  7. luca72

    qt4 setFlags

    luca72, Jun 14, 2007, in forum: Python
    Replies:
    1
    Views:
    438
    Diez B. Roggisch
    Jun 14, 2007
  8. Chris Spencer

    Re: [Py2exe-users] py2exe 0.6.9 released

    Chris Spencer, Nov 17, 2008, in forum: Python
    Replies:
    3
    Views:
    777
    Pascal
    Dec 8, 2008
Loading...