0

I am new on creating GUI apps with python 3.4.4 and kivy. I am trying to create a standalone exe (GUI based) app with this code:

import kivy
kivy.require('1.9.1')

from kivy.app import App
from kivy.uix.label import Label


class MyApp(App):

    def build(self):
        return Label(text='Hello world')


if __name__ == '__main__':
    MyApp().run()

this file is called helloworld.py and is located C:\Python34\projects\helloworld.py

I am using this guide for creating the exe: https://kivy.org/docs/guide/packaging-windows.html

I can run the exe file without any problems on the same computer where I built it, but executing the exe on another computer, it wont open. I see some cmd windows flashing for half a second - thats all.

UPDATE: if I copy all files from the build-generated-directory C:\Python34\dist\helloworld\ to another computer, I can execute the .exe file without any problems. Is it possible to execute the exe file without the other build-directory files? eg. exe file 4MB / whole dir 24MB

UPDATE 2: I am now using PyQt5 - it does all what I want...

Mike
  • 3,200
  • 5
  • 22
  • 33
  • Possible duplicate of [Kivy: compiling to a single executable](http://stackoverflow.com/questions/35952595/kivy-compiling-to-a-single-executable) – Peter Badida Sep 13 '16 at 22:27
  • 1
    If I understand correctly, you are building using [`--onedir`](https://pythonhosted.org/PyInstaller/operating-mode.html#bundling-to-one-folder) (default) and you try to copy only the `.exe` file. Short answer: This won't work. Try [`--onefile`](https://pythonhosted.org/PyInstaller/operating-mode.html#bundling-to-one-file), but you won't get a very different total app size. – Repiklis Sep 14 '16 at 08:55

0 Answers0