Answer the question
In order to leave comments, you need to log in
How to compile for Android from python (Kivy) with __ctypes import error?
Put kiwi, buildozer.
/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=test2 --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/whiteblackgoose/PycharmProjects/mobileapp/test2/.buildozer/android/platform/build" --ndk-api=21
/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=test2 --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/whiteblackgoose/PycharmProjects/mobileapp/test2/.buildozer/android/platform/build" --ndk-api=21 --sdk-dir=/home/whiteblackgoose/.buildozer/android/platform/android-sdk --ndk-dir=/home/whiteblackgoose/.buildozer/android/platform/android-ndk-r17c
Couldn't find a virtualenv executable, you must install this to use p4a
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
File "/home/whiteblackgoose/PycharmProjects/mobileapp/test2/.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'
STDERR:
[email protected]:~/PycharmProjects/mobileapp/test2$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> import _ctypes
>>>
Answer the question
In order to leave comments, you need to log in
Solved the problem by installing libffi-dev, https://stackoverflow.com/questions/57655121/kivy-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question