我需要帮助将.py文件转换为.exe文件

时间:2014-05-13 14:54:39

标签: python pyqt pyqt4 exe pyqt5

我正在尝试使用cx-freeze将.py文件转换为.exe文件。我已经安装了cx-freeze并将python添加到我的计算机路径中。但是,使用下面的代码,我应该在python33中找到qwindows.dll文件。我似乎无法找到该文件,不仅如此,我似乎无法找到平台文件夹。我已经尝试卸载pyqt4并使用安装程序重新安装它并安装pyqt5。我仍然无法找到文件夹/文件......什么都没有用?!!!

我使用的代码在这里:

import sys

from cx_Freeze import setup, Executable

base = "Win64GUI"
path_platforms = ( "C:\Python33\Lib\site-packages\PyQt4\plugins\platforms\qwindows.dll", "platforms\qwindows.dll" )###Find directory of qwindows.dll###
build_options = {"includes" : [ "re", "atexit" ], "include_files" : [ path_platforms ]}

setup(
    name = "Starters 'R' Us", ###Janu change your name here###
    version = "0.1",
    description = "Maths Assessment System",
    options = {"build_exe" : build_options},
    executables = [Executable("MyProgram.py", base = base,shortcutName="Starters 'R' Us",shortcutDir="DesktopFolder")]###Change the .py file to yours.###
    )
###the shortcut creates shortcut on your desktop###

0 个答案:

没有答案
相关问题