Tag: cx freeze

此应用程序无法启动,因为它无法find或加载Qt平台插件“cocoa”

我想在过去的20个小时里我尽了一切努力,但似乎没有任何效果。 我的应用程序正在运行并正在运行 – 就像它应该一样 – 我唯一的问题是我无法从它创build一个.app包。 我尝试了Py2App和cx_Freeze但没有一个正在工作。 如果可能的话,由于多平台的支持,我会坚持使用后者。 setup.py看起来像这样: import sys from cx_Freeze import setup, Executable base = None if sys.platform == 'win32': base = 'Win32GUI' OPTIONS = {'build_exe': {'includes': ['sip', 'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWidgets', 'PyQt5.QtMultimediaWidgets', 'PyQt5.QtMultimedia', 'PyQt5.QtNetwork']}} EXECUTABLES = [Executable('main.py', base=base)] NAME = 'coublet' VERSION = '0.5.70' setup(name = NAME, version = VERSION, options […]

如何在使用cx_freeze时捆绑其他文件?

我在Windows系统上使用Python 2.6和cx_Freeze 4.1.2。 我创build了setup.py来构build我的可执行文件,一切正常。 当cx_Freeze运行时,它将所有内容移动到构build目录。 我有一些其他的文件,我想包括在我的build立目录。 我怎样才能做到这一点? 这是我的结构。 src\ setup.py janitor.py README.txt CHNAGELOG.txt helpers\ uncompress\ unRAR.exe unzip.exe 这是我的片段: build立 ( name='Janitor', version='1.0', description='Janitor', author='John Doe', author_email='john.doe@gmail.com', url='http://www.this-page-intentionally-left-blank.org/', data_files = [ ('helpers\uncompress', ['helpers\uncompress\unzip.exe']), ('helpers\uncompress', ['helpers\uncompress\unRAR.exe']), ('', ['README.txt']) ], executables = [ Executable\ ( 'janitor.py', #initScript ) ] ) 我似乎无法得到这个工作。 我需要一个MANIFEST.in文件吗?

KeyError:'TCL_Library'当我使用cx_Freeze

当我使用cx_Freeze时,在构build我的pygame程序时,我得到了一个keyerror KeyError KeyError: 'TCL_Library' 。 为什么我得到这个,如何解决? 我的setup.py如下: from cx_Freeze import setup, Executable setup( name = "Snakes and Ladders", version = "0.9", author = "Adam", author_email = "Omitted", options = {"build_exe": {"packages":["pygame"], "include_files": ["main.py", "squares.py", "pictures/Base Dice.png", "pictures/Dice 1.png", "pictures/Dice 2.png", "pictures/Dice 3.png", "pictures/Dice 4.png", "pictures/Dice 5.png", "pictures/Dice 6.png"]}}, executables = [Executable("run.py")], )