Results 1 to 3 of 3

Thread: Error occurred when run program packed by py2exe

  1. #1
    Join Date
    Apr 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Error occurred when run program packed by py2exe

    I packed a python program (involving PyQT4) with py2exe, the exe file run normally on my machine, but when i copy it to another machine, error occurred like following (in log file):

    File "PyQt4\QtGui.pyc", line 12, in File "PyQt4\QtGui.pyc", line 10, in __load ImportError: DLL load failed:

    more details:

    i am using Python 2.5.
    MSVCR71.dll is available in the same directorywith the exe file.
    my setup.py script:

    # coding: utf-8

    from distutils.core import setup

    import py2exe

    import sys



    #this allows to run it with a simple double click.

    sys.argv.append('py2exe')


    script = [{

    "script":"test.py",

    'icon_resources':[(0, 'main.ico'),]

    }]



    py2exe_options = {

    "includes":["sip",],

    "dll_excludes": ["MSVCP90.dll",]

    }

    setup(windows=script, options={'py2exe':py2exe_options})

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Error occurred when run program packed by py2exe

    As a non-PyQt user I am just guessing wildly... but I expect you will need the Qt DLLs too. QtCore4.dll, QtGui4.dll etc.

  3. #3
    Join Date
    Apr 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error occurred when run program packed by py2exe

    Quote Originally Posted by ChrisW67 View Post
    As a non-PyQt user I am just guessing wildly... but I expect you will need the Qt DLLs too. QtCore4.dll, QtGui4.dll etc.
    yes, QtCore4.dll, QtGui4.dll were all in the same directory with the exe file. Even i copy all the dll in the "PyQt4\bin" into the same directory with the exe file, also has this problem.

Similar Threads

  1. gif files don't show after compiling with py2exe (using PyQt)
    By illuminatedwax in forum Installation and Deployment
    Replies: 4
    Last Post: 31st January 2011, 04:13
  2. error: A data abort exception has occurred
    By hisong1988 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 13th January 2011, 01:08
  3. Replies: 2
    Last Post: 21st November 2010, 03:42
  4. fatal error C1001: An internal error has occurred in the compiler
    By noodles in forum Installation and Deployment
    Replies: 0
    Last Post: 12th August 2010, 11:24
  5. fatal err or C1001: An internal error has occurred in the compiler.
    By noodles in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 11th August 2010, 13:47

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.