jumpjack
jumpjack

Reputation: 990

How do I add a module to Kivy For Android?

I installed Kivy on my Android device, but help('modules') shows that PIL module is not installed. How can I add it?

edit: I mean, I installed kivy-launcher and written a small test application and it works. Now what if my app require a module not available? To see which modules are available I installed PyCo, a Python Console for kivy.

Now I also installed QPython and SL4A with python interpreter: do I need all of this mess to write a single app which requires an additional module?

I'm not skilled at all in Linux and in compiling APKs, that's why I'm looking for a metod to develop directly on device.

Upvotes: 3

Views: 4799

Answers (1)

inclement
inclement

Reputation: 29450

What exactly do you mean by 'installed Kivy'?

In general, when kivy is compiled for android using python-for-android the first step is to create an android python distribution with any modules you require. The instructions here give some information on this process when building an apk from a kivy project, with the relevant line specifying what modules to use being ./distribute.sh -m "pil kivy".

Edit: When compiling a python-for-android distribution, you can only specify modules for compilation if a recipe exists for them. Current recipes at here.

You can also in general include pure python modules by just including them in your project directory.

Edit2 (Jan 14): This is now a little out of date, recent versions of python-for-android will automatically try to install unrecognised dependencies via pip.

Upvotes: 4

Related Questions