从Python GUI创建EXE时出错

时间:2016-04-12 07:48:39

标签: pyqt py2exe python-3.5

我使用python 3.5和pyQT来创建GUI。

我正在使用我读过的py2exe与python 3一起工作。搜索谷歌后,我相信我的问题与我正在使用的软件包有关。

我的python文件具有以下导入:

import sys
from PyQt4 import QtGui, QtCore
from collections import Counter  
import collections
import math

from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar

import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import os
import matplotlib.cm as cm
import numpy as np
import random
import re

我正在使用py2exe的语法:

python setup.py py2exe 

我的设置文件包含以下内容:

from distutils.core import setup
import py2exe, sys, os
print('Running')
setup(windows=['myProgram.py'], options={"py2exe": {"includes": ["sip","PyQt4" "PyQt4.QtGui","PyQt4.Qt"]}}) 
print("Done!")

当我运行py2exe时购买,我的命令窗口只是冻结而且没有错误消息。我花了几周的时间试图找到一个解决方案,但还没有成功。

我还读过另一个exe程序(pyinstaller)不能仅使用导入工作。不确定这是否与我的问题相关。

任何帮助都会感激不尽,谷歌帮助不大。

由于 杰森

0 个答案:

没有答案