jeudi 5 novembre 2015

.exe doesn't launch after making it with py2exe

Vote count: 0

So I have been working for 2 months on a project in python (it is the first time I'm using python). The project is basically: - 1 main file, - 1 GUI file using PyQt4 - and a few classes for the calculation functions.

Here is my file:

from distutils.core import setup
import py2exe
from glob import glob
import matplotlib

dataf = [

includes = ['sip', 'PyQt4.QtCore', 'PyQt4.Qt', 'PyQt4.QtGui', 'PyQt4.QtNetwork',]
pack = ['numpy.core', 'matplotlib.backends', 'matplotlib.axes', 'zmq', 'PyQt4.QtCore', 'PyQt4.Qt', 
    'PyQt4.QtGui', 'PyQt4.QtNetwork', 'CaptureImage', 'ClusterDetectionIterative', 'DisplayPanel', 
    'ImageProcessAvg', 'WriteOutputFiles',
excludes = ['_gtkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo', '_thread', 
#I admit not understand really much those excludes, that's why I don't put them in the setup

'py2exe': {
        'compressed': 2,
        'optimize': 2,
        'dist_dir': 'ANAFOCUS_Lince5M-3',
        'bundle_files': 1,

win = [{
      'script': '', 
      'icon_resourses': [(1,'icone\icone.png')]

    name = 'ANAFOCUS_Lince5M-3',
    description = 'Anafocus test program for Lince5M-3',
    version = "0.1",

My programs works fine when launched with Eclipse.

The making of the executable seems to be done fine too, except for the list of missing modules there is no error, and my .exe is created...

But when I start it nothing happens... I have been looking for a few days now and I really have no idea on what is wrong since nothing gives me a notice on the problem..

If it could be of any use, my project uses those imports: PyQt4, os, decimal, time, numpy, sys, clr, matplotlib, cv2, and a dll we made in the company.

So here is my question:

  1. Anyone ever got this kind of error?
  2. Does any one know how to get an output, or anything that could tell me where is the problem?
asked 2 mins ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at

.exe doesn't launch after making it with py2exe

Aucun commentaire:

Enregistrer un commentaire