How do I package Kivy apps for iOS? - python

I created an app called Paint Maker Pro with Kivy and Python code and now it's on the Google Play Store. Some of my friends with iPhones want to try the app. But they can't get it from the Apple App Store. So I looked up package for ios kivy and the best answer I could find was this. But the instructions are only for people using macOS. I'm using Linux. I did try following the instructions, but I got an error while trying to install Cython. So what am I supposed to do?

You likely cant package without using OSX. There is a work around though. It can be tricky but I have done this to package apps for OSX itself using pyinstaller.
You are going to need to install virtualbox. Then you might have to do some research on how to install OSX in virtualbox. OSX is not supported by virtualbox. So installation can be complicated. It has been 3 years since I did this but I researched hackentosh. In some of the instructions I have read you have to have access to a actual mac so you can do some bash magic and patch the OSX installer. There is a prepackaged yosemite somewhere im sure you can download. There are also tutorials you can follow that might be more updated than the info Im giving you now.
Hope that helps. and good luck.

Related

Can someone help in compile a GTK/PyGObject All-in-one for Python 3.7?

We used to distribute (for Windows) a very large Python 2/PyGTK application by packaging Python installer itself along other needed installers and packages through an InnoSetup script. Among with those other installers and packages we deliver an all-in-one PyGTK package and it worked very well.
Now we've converted our software for Python 3 and GTK 3. Ok, there is an all-in-one for PyGI [1] (PyGObject Introspection), but just for Python 2.7 to 3.4 and we need at least Python 3.7.
I've spent last couple of weeks learning MSYS2 and trying to understand how MyPaint or Gaphor (which are similar apps) are distributed for Windows without success. I am able to download and install GTK and PyGI using pacman on MSYS2/MingW64 but I cannot figure out how can I create such a package like PyGI all-in-one. I asked for help or instructions on SourceForge but I got no responses so far.
I am asking for help or any clues on how can I generate a PyGI-all-in-one-like installer. Thanks in advance!
[1] https://sourceforge.net/projects/pygobjectwin32/
You can bundle a PyGObject app in Windows using PyInstaller. It can be used with either MSYS2 or gvsbuild to find and bundle all the GTK libraries you need. Then you can use your InnoSetup script to create an installer.

Create python 3.5 exe on Windows

I'm helping my 10yo go through the book "Python for Kids" by Jason Briggs, on Windows 7. He already knows Scratch. He's making great progress in the book, but I'm surprised that it has no information about creating an exe; it assumes Python will be installed on any computer the kids' programs run on. That isn't going to work when the kid wants to give his programs to his friends. Helping him with this book is my own first exposure to Python.
Google led me to cx_Freeze 4.3.4, but when I try to install it (cx_Freeze-4.3.4.win32-py3.4.exe), I get the message:
"Python version 3.4 required, which was not found in the registry."
Does that mean I have to downgrade to Python 3.4? But then I found this thread which seems to indicate that cx_Freeze should work on Python 3.5:
https://sourceforge.net/p/cx-freeze/mailman/message/34695906/
What do I need to do?
cx_Freeze 4.3.4 doesn't work with Python 3.5. However, the development version of cx_Freeze 5.0 is reasonably stable, but since there is still no official release yet, I could not find any easily usable distribution for Windows. So I've created a simple GitHub page with some instructions and pre-built binary Python Wheels for anyone who needs to create an exe distribution with Python 3.5 on Windows: https://github.com/sekrause/cx_Freeze-Wheels
Last I checked Pyinstaller has official support (think it's the only one thus far?) for Python 3.5
Here's a friendly tutorial on how to make an .exe using Pyinstaller. His steps works for me for simple 3.5 applications which might be all you need it for. The youtuber in the link also has a very well-covered playlist for python GUI development which was my first exposure to python GUI development.

trying to install kivy on windows 8.1

I'm trying to install kivy to make an application for android and ios.
I have installed the portable app as per the website but wanted to have it included in my python Idle.
So I searched and found Kivy-1.8.0.win32-py3.4.exe installs it ontop of your python instalation (C:\python34)
When i try and import i can import kivy but it wont let me install App or recognise UIX.
I have looked around and I think that my issue is with pygame, every time i try to install it i get missing files and that is with pip and a pygame-1.9.2a0.win32-py3.2.msi that i found but still nothing!
Also read it might be cython and i installed that too downloading Cython-0.21.1 andtrying to run the instaltion on that.
Is there a way to get this done without a headache?
Do i need kivy to make an app for android and ios or can i use tkinter? (thats works on my pc lol)
please any advice would be great, I have searched but all the information out there is very disjointed and im hoping to find a one stop answer in one of you guys.
thanks
Raif
Do i need kivy to make an app for android and ios or can i use tkinter? (thats works on my pc lol)
You need kivy (or maybe some other python tools, but I don't think any are remotely as good). The android build tools only work on linux or osx, though you can use a virtual machine for it.
If you installed from the popular unofficial windows binaries site, make sure the version matches your python version, and you probably need to get pygame from the same place. I don't know much about this though.
Linux is the best python development environment. Python on Windows is very very buggy with certain packages due to compatibility issue. Many important development packages in python are optimized for Linux. You get rid of all headache by downloading and installing a lightweight Linux like o. So like back box on a virtual machine.
If your goal is a Kivy app for iOS and Android, you have already made several mistakes. The first is that you cannot create an iOS app from any OS except OSX. There's no way around that. The second is that the tools for compiling for Android and iOS only work with Python2.7 currently. You seem to be using Python 3.4.

Deploying Python application+dependencies on OSX from Ubuntu

Background:
I'm writing a non-commercial application in Python, that uses wxPython, and depends on pyPortMidi and SciPy (both available on PyPi). I would like to share this with a small circle of Mac users - who live in different countries.
I work on Ubuntu, and don't have access to OSX systems for testing.
What I'm looking for:
A end-user friendly means of deploying my application, especially given the dependencies
What I've found so far:
Like Ubuntu, OSX comes with it's own Python bundled
This answer
suggests py2app. However, it's not clear from the
documentation
whether I can build an OSX app on an Ubuntu platform. Ditto with cx-Freeze.
Specific Questions:
Can I use py2app to build an OSX app on Ubuntu? And will it automagically include the above dependencies, or do I need to specify it somehow?
If not, can I write some sort of OSX script that will install the package dependies (using easy install, perhaps), painlessly on the end-user system? I haven't used distutils before, and I'm unfamiliar with OSX scripting, so any pointers would be appreciated!
Apologies for the noob questions, and thanks in advance.
You can use py2exe for Windows
Freeze on Linux and as you say py2app for Mac
py2app doesn't work on non-mac machines. As suggested by #victor-castillo-torres, have a look at Freeze, as also suggested in the linked mailing list.
Py2app only works on OSX systems, the code does not support building
bundles for other platforms than the one it is running on. That
is, py2app uses the currently running python installation to build a
depedency graph and copies the files mentioned in that graph to the
application bundle.
From the point of view of building script to install the dependencies
for your script OSX is just like any other Unix system, but with
different GUI libraries. A script that uses easy_install to install
dependencies could be made to work, although I don't know if all your
dependencies are easily available that way (in particular wxPython).

Questions about Django development on Mac OS X

I'm new to Mac (as of yesterday), and I have Snow Leopard. I've just easy_install virtualenv, and it doesn't work. I read a couple other SO questions about the same exception I had, and it seems that I need XCode installed. Before I go down a rabbit hole, installing a 3.5Gb Apple-specific code library for something Python related, and who knows what else at this point, I figured I'd stop by here and find out what's typical for Django developers with Macs.
What tools / libraries that are Python/Django specific, but non-project specific do you commonly use?
Is XCode really necessary to use virtualenv (and potentially other things, or is this just one way to solve my issue?
Are there other Mac issues that you've run into with basic Django development?
Do you have any other tips for a veteran Django dev who is an absolute Mac noob?
You will need XCode, yes. You'll need it for any libraries that need compiling, apart from anything else.
Please don't install MacPorts, though, as recommended by titaniumdecoy. It tries to install its own versions of everything, which is unnecessarily confusing, and takes you out of the usual Mac development stack. A much better package installation tool is homebrew, which uses the built-in tools to install software via a series of recipes. It's excellent.
I started use Mac a couple days ago and I have same problem. You need XCode, yes!
Packgers manager, like apt-get, you can try HomeBrew.
To develop in django, I use TextMate, with some bundles to django.
To develop in python I use pip, virtualenv and virtualenvwrapper, this is awesome.
As an iOS developer I can't comment on the specifics of Django development, but the following should help get you started.
Install macports immediately. You can install virtually any unix tool you can think of with a single command, including virtualenv. (Update: Use HomeBrew instead as suggested in other answers: see comments for why.)
You need to install Xcode to get the Mac OS X developer toolchain (gcc, etc.) unless you prefer to install everything yourself.
If you use Eclipse, the Pydev plug-in is one way to go. TextMate is probably the most popular text editor on the mac. The Python Wiki has a comprehensive rundown of your options.

Categories

Resources