[issue38386] ModuleNotFoundError: No module named '_ctypes'

2019-10-06 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I agree with Ned closing this issue, but just glancing at the logs, it looks to 
me like buildozer has shadowed your Python's ctypes with a broken ctypes in 
/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib

If that's the case, this is definitely not a Python bug and should be reported 
to buildozer.

But one thing you should check first:

run ``which python3`` and make sure that the Python you are running (which has 
ctypes installed) is the same as the /usr/bin/python3 that buildozer is running.

Or run ``/usr/bin/python3 -c "import ctypes"`` and see what happens.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38386] ModuleNotFoundError: No module named '_ctypes'

2019-10-06 Thread Ned Deily


Ned Deily  added the comment:

Sorry, you appear to be using a third-party packaging system that provides 
Python for Android platforms.  It's not something we provide or support.  You 
should ask your question of that project (python-for-android perhaps?) or on a 
forum like StackOverflow.  Good luck!

--
nosy: +ned.deily
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38386] ModuleNotFoundError: No module named '_ctypes'

2019-10-06 Thread yangzongwu


New submission from yangzongwu :

I have try the following, but it is no useful
sudo apt install libffi-dev
 
but when i import _ctypes under python,it is OK
yzw@yzw-virtual-machine:~/Desktop/Test$ python3
Python 3.6.8 (default, Aug 20 2019, 17:12:48) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ctypes
>>>


logs:
yzw@yzw-virtual-machine:~/Desktop/Test$ buildozer android clean

# Ensure build layout
No buildozer.spec found in the current directory. Abandon.
yzw@yzw-virtual-machine:~/Desktop/Test$ 
yzw@yzw-virtual-machine:~/Desktop/Test$ buildozer android clean
# Ensure build layout
No buildozer.spec found in the current directory. Abandon.
yzw@yzw-virtual-machine:~/Desktop/Test$ buildozer init
File buildozer.spec created, ready to customize!
yzw@yzw-virtual-machine:~/Desktop/Test$ buildozer -v android debug
# Check configuration tokens
# Ensure build layout
# Create directory /home/yzw/Desktop/Test/bin
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /home/yzw/.local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' 
\'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' 
\'sh>=1.10; sys_platform!="nt"\' \'pep517\' \'pytoml\' \'virtualenv\''
# Cwd None
# Apache ANT found at /home/yzw/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/yzw/.buildozer/android/platform/android-sdk
# Android NDK found at /home/yzw/.buildozer/android/platform/android-ndk-r17c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp 
--bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs 
--color=always 
--storage-dir="/home/yzw/Desktop/Test/.buildozer/android/platform/build" 
--ndk-api=21'
# Cwd /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android
[INFO]:Will compile for the following archs: armeabi-v7a
[INFO]:Found Android API target in $ANDROIDAPI: 27
[INFO]:Available Android APIs are (27)
[INFO]:Requested API target 27 is available, continuing.
[INFO]:Found NDK dir in $ANDROIDNDK: 
/home/yzw/.buildozer/android/platform/android-ndk-r17c
[INFO]:Found NDK version 17c
[INFO]:Getting NDK API version (i.e. minimum supported API) from user 
argument
[INFO]:Found virtualenv at /home/yzw/.local/bin/virtualenv
[INFO]:ccache is missing, the build will not be optimized in the future.
[INFO]:Found the following toolchain versions: ['4.9']
[INFO]:Picking the latest gcc toolchain, here 4.9
[INFO]:No existing dists meet the given requirements!
[INFO]:No dist exists that meets your requirements, so one will be built.
[INFO]:Found a single valid recipe set: ['hostpython3', 'libffi', 
'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 
'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:The selected bootstrap is sdl2
[INFO]:# Creating dist with sdl2 bootstrap
[INFO]:Dist will have name myapp and requirements (python3, kivy)
[INFO]:Dist contains the following requirements as recipes: ['hostpython3', 
'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 
'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:Dist will also contain modules () installed from pip
[INFO]:-> directory context 
/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3
[INFO]:<- directory context 
/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android
[INFO]:Recipe build order is ['hostpython3', 'libffi', 'openssl', 
'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 
'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:# Downloading recipes 
[INFO]:Downloading hostpython3
[INFO]:-> running mkdir -p /home/yzw/Desktop/Te...(and 57 more)
[INFO]:-> directory context 
/home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/hostpython3
[INFO]:-> running basename https://www.python.or...(and 35 more)
[INFO]:hostpython3 download already cached, skipping  
[INFO]:<- directory context 
/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android
[INFO]:Downloading libffi
[INFO]:-> running mkdir -p /home/yzw/Desktop/Te...(and 52 more)
[INFO]:-> directory