我正在尝试使用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###