Standalone Python EXE Executable - Python Kivy GUI Tutorial #20
Why Stack Overflow recommends it
Stack Overflow users link it when they are trying to turn a Kivy app into a Windows executable with PyInstaller and want a worked example to follow.
Recommended by 0 people across 0 different months, 2021 to 2023.
What it is
A tutorial from John Elder's Python Kivy GUI series showing how to package a Kivy calculator app into a standalone Windows .exe using PyInstaller. It walks through generating a spec file, editing it for Kivy's dependencies, rebuilding, and zipping the output for sharing.
What people said
Cites Jareg · 2021-02 · Stack Overflow · on “'NoneType' object has no attribute 'size' in kivy when it's a exe file”
I'm following Codemy's kivy course and I ran into an error. I used auto_py_to_exe and I added my .kv file. But it says 'NoneType' object has no attribute 'size'. Here's my calc.py file ''' from kivy.app import App from kivy.uix.widget import Widget from kivy.lang import Builder from kivy.core.window import Window # Set the app size Window.size = (500, 600) class MyLayout(Widget): def clear(self): self.ids.calc_input.text = '0' def math_sign(self, sign): prior = self.ids.calc_input.text self.ids.calc_input.text = f"{prior}{sign}" def button_press(self, sign): prior = self.ids.calc_input.text if "Error" in prior: self.ids.calc_input.text = '' if prior == "0": self.ids.calc_input.text = "" self
Cites DanielLIn · 2021-06 · Stack Overflow · on “Creating an executable kivy app and exe installer”
I created a data-miner GUI for twitter with kivy and am currently having a lot of trouble turning it into an exe. I tried following this video [this video] and import glew and sdl2 into my spec but after doing pyinstaller main.spec, my executable still would not open. Is it because I have more than one files and folders for my program (here is the link [LINK] to the github repo for my project), if so, how do you deal with that? In addition, if I manage to success create a working exe, how do I create an exe installer that other people can use to install the executable?
Cites Coder Alpha · 2023-05 · Stack Overflow · on “Endless trace messages when converting python kivy program to exe file with pyinstaller”
So i am trying to convert an example kivy program into an exe standalone file from this documentation page, just as a bleak example to investigate why my pyinstaller and kivy do not work: [LINK] A .kv file is not needed for this particular implementation. The code is in the file main2.py: from random import random from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.button import Button from kivy.graphics import Color, Ellipse, Line class MyPaintWidget(Widget): def on_touch_down(self, touch): color = (random(), 1, 1) with self.canvas: Color(*color, mode='hsv') d = 30. Ellipse(pos=(touch.x - d / 2, touch.y - d / 2), size=(d, d)) touch.ud['line'] = Line(points=(touch.x, to