Packaging a kivy app in windows

654 views
Skip to first unread message

Ivan SanchezFernandez

unread,
Dec 1, 2015, 8:45:37 PM12/1/15
to Kivy users support
Hi,

I have been trying to package a kivy app in a windows machine for distribution for other windows machine as an .exe. I have been trying that for 2 months now.

I use windows 7, but I have tried also in windows 8.

I use python 3.5 but I saw that only python 2.7 works for packaging apps so I have tried in python 2.7.10 in approximately 200 different ways. 

I have tried all versions of kivy, all versions of python. I visited all help pages regarding the errors I was getting. 

Pages I visited (some of them with their own sublinks)








I was able to build the package but then the package with the .exe does not install in windows (either closes immediately or opens and empty window and then it closes). I have been through so many errors and I have tried to solve them with patience. 

However, I have tried to package my app more than 200 times with different approaches and visiting all possible pages trying to solve the errors now with no success (the most I get is a package with a non-functional .exe). 

I have also seen that it is a common issue but some people was able to package a functional app eventually.

I am wondering: 
1.Is there a clear and step by step approach to packaging kivy 1.9.0 that actually gives a functional .exe?
2.I have seen that a kivy 1.9.1 is available (hopefully this version will be easier to package) but the installation (python -m pip install kivy) fails. First it tries to install the 1.9.0 version and then it says "Failed building wheel for kivy" I have installed visual C++ and also made sure its path was added. Not sure how to install version 1.9.1

I am desperate and close to abandoning kivy because I have tried all possible ways by now with no success. However, I developed a very helpful app in kivy and it is a shame to lose it because I cannot distribute it.

Can you please help me?


Thank you very much

OPQ

unread,
Dec 2, 2015, 3:22:11 AM12/2/15
to Kivy users support
First, note that instructions for installation have been changed like yesterday. So you should try the new one ! 

I recently undergone this myself when packaging for Win64/Windows 7. 
I suceeded whith the following step by step approach:

1) I create a completly blank virtual machine with Windows 7 32 Bits
2) I downloaded official Kivy 1.9
3) Then, in your kivy install folder (let's say c:\kivy1.9), renamed kivy27 folder to kivy27_stable
4) download master from github and move the unzipped kivy folder to c:\kiviy1.9\Kivy27 (name of the previous folder)
5) start a kivy.bat and do 'cd kivy27' then 'make force'
6) now you can apply the packaging guide for windows, with pyinstaller creating the spec file and the replacing the **get_hooks (as in http://kivy.org/docs/guide/packaging-windows.html)


The executable I produced was happily running on both Windows7 64 & 32 bits.

Good luck packaging

Karla Muguerza

unread,
Dec 2, 2015, 10:00:28 PM12/2/15
to Kivy users support
OPQ thanks a lot, I will try your approach tomorrow; hopefully it works... i was just about to quit kivy, there's hope!
Reply all
Reply to author
Forward
0 new messages