Buildozer未能满足numpy要求

Buildozer未能满足numpy要求,numpy,kivy,buildozer,Numpy,Kivy,Buildozer,我试图制作一个使用numpy的应用程序,但当我用buildozer编译时,我得到了一个错误(显然是下载错误)。当我不使用numpy编译时,这很好 备注:我使用的是VirtualBox Ubuntu 16.04(为我自己配置),然后我认为我做错了什么,然后我从官方网站(kivy下载)下载了kivy buildozer VM,并在那里得到了相同的错误 我做错了什么 buildozer.spec具有: requirements=kivy,numpy 这是log_level=2的日志: kivy@kiv

我试图制作一个使用numpy的应用程序,但当我用buildozer编译时,我得到了一个错误(显然是下载错误)。当我不使用numpy编译时,这很好

备注:我使用的是VirtualBox Ubuntu 16.04(为我自己配置),然后我认为我做错了什么,然后我从官方网站(kivy下载)下载了kivy buildozer VM,并在那里得到了相同的错误

我做错了什么

buildozer.spec具有:

requirements=kivy,numpy

这是log_level=2的日志:

kivy@kivyvm:~/android/NumpyModule$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.10 (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 /usr/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 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=MoverNumpy --bootstrap=sdl2 --requirements=kivy,numpy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/android/NumpyModule/.buildozer/android/platform/build'
# Cwd /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', u'numpy', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', 'python2', u'numpy', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', u'numpy', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name MoverNumpy and recipes (kivy, numpy)
[INFO]:    Dist will also contain modules () installed from pip
[INFO]:    -> running cp -r /home/kivy/android/Numpy...(and 200 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', u'numpy', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    # Downloading recipes
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 64 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 63 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_image download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 63 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_mixer download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 61 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    sdl2_ttf download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 60 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading numpy
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 58 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/numpy
[INFO]:    -> running basename http://pypi.python.org...(and 43 more)
[INFO]:    numpy download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 57 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
    [INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 56 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    six download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 60 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename https://github.com/kiv...(and 28 more)
[INFO]:    pyjnius download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/kivy/android/Nu...(and 57 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename https://github.com/kiv...(and 25 more)
[INFO]:    kivy download already cached, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi-v7a
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
          work[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking numpy for armeabi-v7a
[INFO]:    -> running basename http://pypi.python.org...(and 43 more)
[INFO]:    -> directory context /home/kivy/android/NumpyModule/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a
Traceback (most recent call last):
 File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
   "__main__", fname, loader, pkg_name)
 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
   exec code in run_globals
 File "/home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in <module>
   main()
 File "/home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main
   ToolchainCL()
 File "/home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__
   getattr(self, args.subparser_name.replace('-', '_'))(args)
 File "/home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
   build_dist_from_args(ctx, dist, args)
 File "/home/kivy/android/NumpyModule/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 192, in build_dist_from_args
   build_recipes(build_order, python_modules, ctx)
 File "pythonforandroid/build.py", line 558, in build_recipes
 File "pythonforandroid/recipe.py", line 550, in prepare_build_dir
 File "pythonforandroid/recipe.py", line 452, in unpack
 File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1245, in __call__
   return RunningCommand(cmd, call_args, stdin, stdout, stderr)
 File "/usr/local/lib/python2.7/dist-packages/sh.py", line 633, in __init__
   self.wait()
 File "/usr/local/lib/python2.7/dist-packages/sh.py", line 651, in wait
   self.handle_command_exit_code(exit_code)
 File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
   raise exc
sh.ErrorReturnCode_2:

  RAN: /bin/tar xf /home/kivy/android/NumpyModule/.buildozer/android/platform/build/packages/numpy/numpy-1.9.2.tar.gz

  STDOUT:


  STDERR:
/bin/tar: This does not look like a tar archive

gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=MoverNumpy --bootstrap=sdl2 --requirements=kivy,numpy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/android/NumpyModule/.buildozer/android/platform/build
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy@kivyvm:~/android/NumpyModule$buildozer android调试部署运行
#检查配置令牌
#确保构建布局
#检查配置令牌
#准备构建
#检查android的要求
#运行“dpkg--版本”
#Cwd无
Debian“dpkg”软件包管理程序版本1.18.10(amd64)。
这是自由软件;请参阅GNU通用公共许可证版本2或
稍后用于复制条件。没有担保。
#搜索Git(Git)
#->位于/usr/bin/git
#搜索Cython(Cython)
#->可在/usr/local/bin/cython找到
#搜索Java编译器(javac)
#->位于/usr/lib/jvm/java-8-openjdk-amd64/bin/javac
#搜索Java键工具(键工具)
#->位于/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
#安装平台

#运行'pip install-q--user“appdirs”“colorama>=0.3.3”“sh>=1.10,是否执行此操作:
wgethttp://pypi.python.org/packages/source/n/numpy/numpy-1.9.2.tar.gz

如果没有,那么您可能对wget有一些SSL错误配置,这意味着buildozer脚本无法下载numpy-1.9.2


因此,只需转到浏览器上的链接,下载所述文件,并将其放在适当的文件夹中。

事实上,问题在于url中的“http”,在正确的文件中将其更改为“https”即可。这是python for android master中的corect,只需克隆此解析即可。谢谢!太棒了!如果您能将答案标记为正确,那就太好了;)