DEV Community

Discussion on: Wow can python do that?

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Just FYI, if you're hoping to deploy a Kivy application to Linux, you're in for a world of pain. Learned that from personal experience. The problem is that you cannot pip install Kivy and its Cython depedency in the same command, breaking nearly every known packaging tool and pattern. PyInstaller works, but only if you ignore good packaging practice and allow it to bundle nearly everything, wherein it cannot be packaged on Linux portably at all. You'll even notice their official packaging guide does not talk about how to package for Linux.

In case anyone is wondering, this wasn't "me". I got help from one of Kivy's core developers (tshirtman), from a primary Snapcraft developer (Alan Pope), one of the core AppImage developers (TheAssassin), and a Debian packaging mentor (pabs) in turn. After months of this, the end conclusion was simple: NOPEnopenopenopenopeNOPEnopenope. (I believe that incident is why the Kivy documentation now fully acknowledges that the Linux wheels are "experimental".) The bug is known, isolated, and documented. It's just harder to fix than anyone anticipated.

Long story short, while Kivy is "compatible" with Linux, it isn't packagable with Linux. Stick with PySide2 for portable desktop UIs.

Collapse
 
belloshehu profile image
Shehu Bello

Hello Jason,
Thanks a lot for the life-saving information. I am currently trying to package a Kivy app I developed on my Linux machine and the target machine for the app is windows. How do I go about it?

Thanks once again.

Collapse
 
codemouse92 profile image
Jason C. McDonald

PyInstaller, and lots of prayer.

Collapse
 
gillarohith profile image
Rohith Gilla

Oh thanks for the note.
Will keep that in mind.
Btw were you able to deploy the Linux app finally?

Collapse
 
codemouse92 profile image
Jason C. McDonald

Nope! When I have the time, I have to rebuild it in PySide2. Three years wasted.

Thread Thread
 
gillarohith profile image
Rohith Gilla

Ouch 😓
Thanks for the review, it will help others who are reading the post.