Skip to content

Can't import PIL on python for android and kivy? #853

Closed

Description

@mnural

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?

Activity

  1. inclement commented on Jul 27, 2016

    @inclement
    Member

    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.

  2. dfrison01 commented on Jul 20, 2017

    @dfrison01

    My app still does not work with Pillow. Am I doing something wrong or is there no recepe till the present date?

  3. inclement commented on Jul 20, 2017

    @inclement
    Member

    No, there is still no pillow recipe. Testing the linked PR is still welcome.

  4. dfrison01 commented on Jul 26, 2017

    @dfrison01

    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

  5. Shahxad-Akram commented on Feb 1, 2018

    @Shahxad-Akram

    Did you find the solution??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions