Buildozer cannot Import requests module

601 views
Skip to first unread message

sstereomatchingkiss

unread,
Mar 29, 2019, 12:52:59 PM3/29/19
to Kivy users support
Trying to port a simple app to android, but the app cannot start because it cannot find the module "requests"

Source codes : pastebin
Android phone : G3226
buildozer.spec: pastebin

deploy command : buildozer android debug deploy run

I tried to add "requests" to the requirements, but it give me error messages

 STDOUT:
Traceback (most recent call last):
 
File "setup.py", line 11, in <module>
   
import setuptools
 
File "/home/ramsus/Qt/jobs/kivy_app/.buildozer/android/platform/build/build/other_builds/setuptools-python3/arm64-v8a__ndk_target_21/setuptools/setuptools/__init__.py", line 14, in <module>
   
from setuptools.dist import Distribution, Feature
 
File "/home/ramsus/Qt/jobs/kivy_app/.buildozer/android/platform/build/build/other_builds/setuptools-python3/arm64-v8a__ndk_target_21/setuptools/setuptools/dist.py", line 25, in <module>
   
from setuptools import windows_support
 
File "/home/ramsus/Qt/jobs/kivy_app/.buildozer/android/platform/build/build/other_builds/setuptools-python3/arm64-v8a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
   
import ctypes
 
File "/home/ramsus/Qt/jobs/kivy_app/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
   
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'


How could I solve this issue?Thanks

Thomas S.

unread,
Mar 29, 2019, 1:18:23 PM3/29/19
to Kivy users support
This is a known issue, there have been quite a few mentions of it on github:



In short, the solution is to install libffi-dev module to your system. Do: sudo apt-get install libffi-dev . Then, rebuild.

I assume you have the latest dev version of buildozer installed and that kivy==master in your requirements. Make sure that p4a.branch = master !

Hopefully, you will get sorted out.

Thomas S.

unread,
Mar 29, 2019, 1:20:54 PM3/29/19
to Kivy users support
Actually, before rebuilding clean any previous build: buildozer android clean


On Friday, 29 March 2019 18:52:59 UTC+2, sstereomatchingkiss wrote:

sstereomatchingkiss

unread,
Mar 29, 2019, 2:16:37 PM3/29/19
to Kivy users support
Thanks, kivy==master save my ass.

My requirements

requirements = kivy==master,openssl,requests

Thomas Sfondylis

unread,
Mar 29, 2019, 3:40:23 PM3/29/19
to kivy-...@googlegroups.com
So, did you compile successfully?
Did you install libff-dev module?

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/cRh5gEOlmwk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e2f17b37-6336-43db-8d8d-faffca8630ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages