我想将我的 python.exe 用于在我的计算机上编译和运行我的程序的所有 python 库和依赖项包含到由 py2exe 生成的 exe 中,因为py2exe **.exe* 生成的仍然返回错误和中止,
谢谢
这里是我在我的程序中使用的库:
from Tkinter import * # POUR L'interface graphique
import tkFileDialog # POUR l'ouverture d'
import csv
import ttk
import Tix as tix
import re # regular exprun fichier
import tkMessageBox # POUR un messageboxe pour quitter le programme
import py2exe, sys, os
import numpy as np
from threading import Thread
import datetime as dt
import pygal
from bokeh.plotting import figure, output_file, show
from datetime import datetime as time
import matplotlib.pyplot as plt
from PyQt4 import QtGui
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
from matplotlib import cm
from matplotlib.dates import date2num
from matplotlib.gridspec import GridSpec
import matplotlib.dates as mdates
这里是我的 setup.exe 脚本:
import sys
import os
import glob
import os.path
from distutils.core import setup
import py2exe
sys.setrecursionlimit(5000)
sys.argv.append('py2exe')
"""
setup(
options = {'py2exe': { 'compressed': True}},
windows = [{'script': "D:\Users\u156726\PycharmProjects\SFR_APP\SFR_APP_BIG_DATA.py"}],
zipfile = None,
)
"""
import matplotlib
import glob
setup(console=['D:\Users\u156726\PycharmProjects\SFR_APP\SFR_APP.py'],options={
'py2exe': {
'packages' : ['matplotlib', 'pytz'],
}
},