installing python packages on android

3.7k Views Asked by At

I want to install a python package from source on android. Is this possible? I tried in the console to run the py install files, but distutils (.core, ccompiler) isn't being found. Is it possible to still install them?

2

There are 2 best solutions below

2
On

Android does not ship with a Python interpreter, nor does it ship with gcc or other compilers. You will need to get an ARM binary from somewhere or cross-compile one yourself. (BTW, I'm assuming ARM, but substitute in whatever architecture you happen to be running).

0
On

If you're using ASE (Android Scripting Environment), and the package you want to install is pure-python (that is, no C compiled libraries), you can simply copy the package's directory manually onto the sdcard, to /sdcard/ase/extras/python (as specified on the ASE FAQ).