joaoventura / pybridge

Reuse Python code in native Android applications
215 stars 56 forks source link

Including library python #14

Closed fedicherif closed 4 years ago

fedicherif commented 6 years ago

Hey, how can i include numpy library in this project ?

joaoventura commented 6 years ago

Probably you'll have to cross-compile to android with the crystax-ndk. I'm leaving this issue open, maybe someone can help you!

fedicherif commented 6 years ago

thank you

frmdstryr commented 6 years ago

You can try using conda-mobile for this. I made it for enaml-native but it should work for any Android project targeting API >= 21.

It has python, numpy, and various other libraries and extensions compiled for android that you can install and use. It's also fairly straightforward to add new "recipes" for other extensions with it.

abelokon0711 commented 6 years ago

@joaoventura How would cross-compiling look like? Let's say I would want to add the OpenCV2 or Tesseact Python library

joaoventura commented 4 years ago

This project now uses the python-for-android toolchain and they seem to have some recipes for compiling lots of python modules (https://github.com/kivy/python-for-android/tree/develop/pythonforandroid/recipes).