Sachit Gali
Sachit Gali

Reputation: 129

How to run dlib package in buildozer?

I am new to Android app development and I'm creating a facial recognition app with kivy and buildozer. To be able to use the dlib package, how should I modify the buildozer.spec file? Is it enough to simply add dlib to the requirements line? Dlib has many dependencies that cannot be installed with pip (Cmake,Boost, Boost.python, X11), and I'm not sure whether or not python-for-android had recipes for them.

Upvotes: 1

Views: 857

Answers (1)

Mikhail Gerasimov
Mikhail Gerasimov

Reputation: 39576

Only pure-Python packages can be plainly added with modifying buildozer.spec file. If module contains binaries or code that should be compiled to binary, it must have python-for-android recipe that will compile this module (and it's dependencies) for Android properly. List of available p4a recipes you can see here. There's no recipe for dlib: you can either try to write your recipe based on existing (but it would be hard IMHO) or, for example, try to search for some alternative. May be face recognition with OpenCV (that already has recipe)? Note, I didn't try it myself.

Upvotes: 1

Related Questions