You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't import PIL on python for android and kivy? #853
I've added the PIL/pillow to the requirements of the kivy buildozer.spec file requirements = kivy, openssl, futures, requests, plyer, pyjnius, pillow
When i want to create an apk with this configuration, the apk package succesfully builds but if i install apk and run on my android phone, i'm getting this error in logcat:
I/python (20188): Traceback (most recent call last):
I/python (20188): File "/home/mnrl/teknik/.buildozer/android/app/main.py", line 32, in <module>
I/python (20188): File "/home/mnrl/teknik/.buildozer/android/app/_applibs/PIL/Image.py", line 67, in <module>
I/python (20188): ImportError: dlopen failed: "/data/data/org.tokerteknik.tokerteknik/files/_applibs/PIL/_imaging.so" is 64-bit instead of 32-bit
I/python (20188): Python for android ended.
I think the problem related to architecture. I'm using ubuntu 16.04 64 bit and kivy buildozer installs 64 bit libraries with pip while installing requirements.
Briefly how can i import PIL on android with kivy buildozer or how to install 32 bit libraries of PIL on 64 bit system?
There isn't currently a pillow recipe, so this won't work. You can use pil, or you could test the PR at #786 (in which case you still use pil but it's replaced internally with pillow). I think I'll prefer to add a pillow recipe rather than merging that, so I'll try to deal with it soon.
Thanks @inclement! I'll try that, although i think this is way beyond my knowledge hahaha
I would be awesome to see someone putting this to work the proper way, since pil is long time dead
Activity
inclement commentedon Jul 27, 2016
There isn't currently a pillow recipe, so this won't work. You can use
pil, or you could test the PR at #786 (in which case you still usepilbut it's replaced internally with pillow). I think I'll prefer to add a pillow recipe rather than merging that, so I'll try to deal with it soon.dfrison01 commentedon Jul 20, 2017
My app still does not work with Pillow. Am I doing something wrong or is there no recepe till the present date?
inclement commentedon Jul 20, 2017
No, there is still no pillow recipe. Testing the linked PR is still welcome.
dfrison01 commentedon Jul 26, 2017
Thanks @inclement! I'll try that, although i think this is way beyond my knowledge hahaha
I would be awesome to see someone putting this to work the proper way, since pil is long time dead
Shahxad-Akram commentedon Feb 1, 2018
Did you find the solution??