与Kivy一起使用PyInstaller(helloWorld.py)

时间:2017-02-11 00:17:54

标签: python user-interface kivy pyinstaller

我正在尝试打包一个用Kivy for Windows编写的简单应用程序。为了打包到可执行文件,我选择了PyInstaller。

我也一直在尝试关注this tutorial,但没有成功。我一直在搜索几个Stack Overflow主题,但没有找到通用教程。

如何使用PyInstaller将“Kivy hello world”打包成独立的可执行文件? .spec文件让我很困惑。我已经安装了每个包,一切都像python脚本一样工作。

源代码:

# helloWorld.py
from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        return Button(text='Hello World')

TestApp().run()

我已经从中创建了一个exe文件,但窗口立即消失。

0 个答案:

没有答案