i'm trying compile python projet executable file cx_freeze. python setup.py build
command works, have .exe file created when want execute have original exception error message:
exception raised when calling format_exception exception: 'str' object has no attribute '__cause__' original exception: cannot import name _methods
in compilation log file found many imports errors:
missing modules: ? ipython.utils.generics imported pandas.core.panel ? pil imported matplotlib.image ? pyqt4.qtcore imported matplotlib.backends.qt4_compat ? pyrex.compiler.main imported numpy.distutils.command.build_src ? stringio imported 6 ? userdict imported pytz ? __config__ imported numpy.distutils ? _curses imported curses ? _frozen_importlib imported pkg_resources ? _gestalt imported platform ? _transforms imported matplotlib.dates ? bottleneck imported pandas.core.nanops ? cpickle imported xlsxwriter.compat_collections ? cstringio imported pkg_resources ? compiler imported numpy.lib.utils ? gobject imported matplotlib.pyplot ? has_key imported curses ? md5 imported matplotlib.texmanager ? mpl_toolkits.natgrid imported matplotlib.mlab ? multiprocessing._multiprocessing imported multiprocessing.forking ? nose imported numpy.testing.nosetester ? numarray imported numpy.distutils.system_info ? numexpr imported pandas.core.expressions ? numpy.core._dotblas imported numpy.core.numeric ? numpy.core.exp imported numpy.linalg.linalg ? numpy.core.integer imported numpy.fft.helper ? numpy.core.signbit imported numpy.testing.utils ? numpy.e imported numpy.numarray.functions ? numpy_distutils imported numpy.f2py.diagnose ? openpyxl.reader.excel imported pandas.io.parsers ? pudb imported pandas.util.testing ? pyemf imported matplotlib.backends.backend_emf ? qt imported matplotlib.pyplot ? scikits.statsmodels.api imported pandas.stats.ols ? scipy imported numpy.testing.nosetester ? sets imported numpy.lib.function_base ? setuptools imported numpy.distutils.core ? sip imported matplotlib.backends.qt4_compat ? statsmodels.api imported pandas.stats.ols ? sysconfig imported pkg_resources ? tables imported pandas.io.pytables ? thread imported dateutil.rrule ? urlparse imported pkg_resources ? wx imported matplotlib.pyplot ? xlrd imported pandas.io.parsers ? xlwt imported pandas.io.parsers
i've searched of not imported files not on computer obviously. suspected errors of librairies installations doesn't seem that. installed twice. else ?
i'm using python 3.1, cx_freeze 4.2.3, matplotlib 1.2.0, pandas 0.11.0, , numpy 1.7.1.
here's setup.py
# -*- coding: utf-8 -*- #!/usr/bin/env python import sys, os cx_freeze import setup, executable ############################################################################# path = sys.path + ["."] includes = ['json', 'xml', 'pyside', 'xml.sax', 'xml.etree', 'xml.etree.elementtree','xml.etree.celementtree','xml.etree.elementinclude','test', 'test.support','runpy','ctypes.util','logging.config','configparser','ctypes.wintypes','zipfile','sqlite3', 'io', 'subprocess', 'zlib','atexit','csv','pandas','matplotlib','numpy','xlsxwriter','re','itertools','os','sys'] include_files = [] excludes = [] packages = ['numpy.lib.format'] options = {"path": path, "includes": includes, "excludes": excludes, "packages": packages, "include_files": include_files, "build_exe": "c:/temp/test/", "create_shared_zip" :false} ############################################################################# base = none if sys.platform == 'win32': base = 'win32gui' cible_1 = executable( script = "d:/edoc/src/tool/main.py", base = base, compress = true, appendscripttoexe = true, appendscripttolibrary = false, copydependentfiles = true, targetname = 'tool.exe', targetdir = "c:/temp/test/") buildoptions = dict(create_shared_zip = false) ############################################################################# setup( name = 'tool', version = '1', description = '' , author = '', options = {'build_exe': options}, executables = [cible_1])
and here imports in main.py
import sys import os import functools import configparser import time import subprocess import itertools import csv import numpy np import pandas pd xlsxwriter.workbook import workbook #import matplotlib dependencies merge pyside , matplotlib plot import matplotlib matplotlib.use('wxagg') matplotlib.rcparams['backend']='qt4agg' matplotlib.rcparams['backend.qt4']='pyside' matplotlib.figure import figure matplotlib.backends.backend_qt4agg import (figurecanvasqtagg figurecanvas, navigationtoolbar2qt navigationtoolbar) import matplotlib.pyplot plt import pyside pyside import qtcore,qtgui,qtuitools pyside.qtuitools import * pyside.qtcore import * pyside.qtgui import *
anyone has idea of cause of issue ?
Comments
Post a Comment