Python 如何阻止Buildozer在线下载食谱?

Python 如何阻止Buildozer在线下载食谱?,python,virtualbox,buildozer,Python,Virtualbox,Buildozer,在我开始使用Buildozer v3.3构建我的应用程序后,它总是崩溃,因为我没有dist。因此它尝试在线下载食谱,但出于某种原因(可能与我在Ubuntu 64位虚拟机上有关),它从未实现这一点。有没有一种方法可以将其指向pythonforandroid文件夹中的菜谱,或者修复套接字/握手的问题 我在Windows10主机上运行一个Ubuntu 64位虚拟机,我使用Buildozer 0.33、Kivy 1.9.1和python for android主文件夹。下面是输出日志的主要位 [WARN

在我开始使用Buildozer v3.3构建我的应用程序后,它总是崩溃,因为我没有dist。因此它尝试在线下载食谱,但出于某种原因(可能与我在Ubuntu 64位虚拟机上有关),它从未实现这一点。有没有一种方法可以将其指向pythonforandroid文件夹中的菜谱,或者修复套接字/握手的问题

我在Windows10主机上运行一个Ubuntu 64位虚拟机,我使用Buildozer 0.33、Kivy 1.9.1和python for android主文件夹。下面是输出日志的主要位

[WARNING]: $ANDROIDNDKVER is deprecated and no longer necessary, the value you set is ignored
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 19
[WARNING]: Target API 19 < 26
[WARNING]: Target APIs lower than 26 are no longer supported on Google Play, and are not recommended. Note that the Target API can be higher than your device Android version, and should usually be as high as possible.
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/kivy/.buildozer/android/platform/android-ndk-r9c
[INFO]:    Could not determine NDK version, no source.properties in the NDK dir
[WARNING]: NDK API target was not set manually, using the default of 19 = min(android-api=19, default ndk-api=21)
[WARNING]: NDK API less than 21 is not supported
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[WARNING]: Missing executable: pkg-config 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]:        ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:        ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:        ['hostpython2legacy', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2legacy', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:        ['hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:    Using the first of these: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name camera and requirements (kivy)
[INFO]:    Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:    Dist will also contain modules () installed from pip
[INFO]:    -> directory context /home/kivy/Downloads/Camera/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3
[INFO]:    <- directory context /home/kivy/Downloads/Camera/python-for-android-master
[INFO]:    Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'six', u'pyjnius', 'android', u'kivy']
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython3
[INFO]:    -> running mkdir -p /home/kivy/Downloads/...(and 61 more)
[INFO]:    -> directory context /home/kivy/Downloads/Camera/.buildozer/android/platform/build/packages/hostpython3
[INFO]:    -> running basename https://www.python.org...(and 34 more)
[INFO]:    -> running rm -f .mark-Python-3.7.1.tgz
[INFO]:    Downloading hostpython3 from https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
- Download 98.[INFO]:    -> running touch .mark-Python-3.7.1.tgz               
[INFO]:    <- directory context /home/kivy/Downloads/Camera/python-for-android-master
[INFO]:    Downloading libffi
[INFO]:    -> running mkdir -p /home/kivy/Downloads/...(and 56 more)
[INFO]:    -> directory context /home/kivy/Downloads/Camera/.buildozer/android/platform/build/packages/libffi
[INFO]:    -> running basename https://github.com/lib...(and 32 more)
                                                                  [INFO]:    -> running rm -f .mark-v3.2.1.tar.gz
[INFO]:    Downloading libffi from https://github.com/libffi/libffi/archive/v3.2.1.tar.gz
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, 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/Downloads/Camera/python-for-android-master/pythonforandroid/toolchain.py", line 1081, in <module>
    main()
  File "/home/kivy/Downloads/Camera/python-for-android-master/pythonforandroid/toolchain.py", line 1075, in main
    ToolchainCL()
  File "/home/kivy/Downloads/Camera/python-for-android-master/pythonforandroid/toolchain.py", line 577, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/kivy/Downloads/Camera/python-for-android-master/pythonforandroid/toolchain.py", line 151, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/kivy/Downloads/Camera/python-for-android-master/pythonforandroid/toolchain.py", line 200, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 540, in build_recipes
  File "pythonforandroid/recipe.py", line 297, in download_if_necessary
  File "pythonforandroid/recipe.py", line 343, in download
  File "pythonforandroid/recipe.py", line 158, in download_file
  File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 208, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 437, in open_https
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 1013, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 864, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 826, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1220, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 243, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 1] _ssl.c:510: error:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000)
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=camera --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --local-recipes /home/kivy/Downloads/Camera/python-for-android-master/pythonforandroid/recipes --color=always --storage-dir=/home/kivy/Downloads/Camera/.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
[警告]:$ANDROIDNDKVER已弃用,不再需要,您设置的值将被忽略
[信息]:将为以下ARCH编译:armeabi-v7a
[信息]:在$ANDROIDAPI:19中找到Android API目标
[警告]:目标API 19<26
[警告]:Google Play不再支持低于26的目标API,因此不推荐使用。请注意,目标API可以高于您的设备Android版本,并且通常应尽可能高。
[信息]:可用的Android API有(19)
[信息]:请求的API目标19可用,继续。
[信息]:在$ANDROIDNDK:/home/kivy/.buildozer/android/platform/android-NDK-r9c中找到NDK dir
[信息]:无法确定NDK版本,NDK目录中没有source.properties
[警告]:未手动设置NDK API目标,使用默认值19=min(android API=19,默认NDK API=21)
[警告]:不支持小于21的NDK API
[信息]:在/usr/local/bin/virtualenv找到virtualenv
[信息]:找到以下工具链版本:['4.6','4.8','clang3.3']
[信息]:选择最新的gcc工具链,这里是4.8
[警告]:缺少可执行文件:未安装pkg config
[信息]:没有任何现有Dist满足给定的要求!
[信息]:不存在满足您要求的dist,因此将创建一个dist。
[信息]:找到多个有效的依赖项订单:
[信息]:['hostpython3'、'libffi'、'openssl'、'sdl2_image'、'sdl2_mixer'、'sdl2_ttf'、'sqlite3'、'python3'、'sdl2'、'six',u'pyjnius'、'android',u'kivy']
[信息]:['hostpython2'、'sdl2_image'、'sdl2_mixer'、'sdl2_ttf'、'python2'、'sdl2'、'six',u'pyjnius'、'android',u'kivy']
[信息]:['hostpython2legacy','sdl2_image','sdl2_mixer','sdl2_ttf','python2legacy','sdl2','six',u'pyjnius','android',u'kivy']
[信息]:['hostpython3crystax','sdl2_image','sdl2_mixer','sdl2_ttf','python3crystax','sdl2','six',u'pyjnius','android',u'kivy']
[信息]:使用第一个选项:['hostpython3','libffi','openssl','sdl2_image','sdl2_mixer','sdl2_ttf','sqlite3','python3','sdl2','six',u'pyjnius','android',u'kivy']
[信息]:所选引导是sdl2
[信息]:#使用sdl2引导创建dist
[信息]:Dist将有摄像机名称和要求(kivy)
[信息]:Dist包含以下配方要求:['hostpython3'、'libffi'、'openssl'、'sdl2_image'、'sdl2_mixer'、'sdl2_ttf'、'sqlite3'、'python3'、'sdl2'、'six',u'pyjnius'、'android',u'kivy']
[信息]:Dist还将包含从pip安装的模块()
[信息]:->目录context/home/kivy/Downloads/Camera/.buildozer/android/platform/build/build/bootstrap\u builds/sdl2-python3
[信息]:运行mkdir-p/home/kivy/Downloads/…(以及更多)
[信息]:->目录context/home/kivy/Downloads/Camera/.buildozer/android/platform/build/packages/hostpython3
[信息]:->正在运行basenamehttps://www.python.org...(还有34个)
[信息]:->运行rm-f.mark-Python-3.7.1.tgz
[信息]:正在从下载hostpython3https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
-下载98.[信息]:->运行touch.mark-Python-3.7.1.tgz
[信息]:运行mkdir-p/home/kivy/Downloads/…(以及更多)
[信息]:->目录context/home/kivy/Downloads/Camera/.buildozer/android/platform/build/packages/libffi
[信息]:->正在运行basenamehttps://github.com/lib...(还有32个)
[信息]:->运行rm-f.mark-v3.2.1.tar.gz
[信息]:从下载libffihttps://github.com/libffi/libffi/archive/v3.2.1.tar.gz
回溯(最近一次呼叫最后一次):
文件“/usr/lib/python2.7/runpy.py”,第162行,在运行模块中作为主模块
“\uuuuu main\uuuuuuuuuuuuuuuuuuuuuuuuu”,fname,loader,pkg\u name)
文件“/usr/lib/python2.7/runpy.py”,第72行,在运行代码中
run_globals中的exec代码
文件“/home/kivy/Downloads/Camera/python for android master/pythonfordroid/toolchain.py”,第1081行,在
main()
文件“/home/kivy/Downloads/Camera/python for android master/pythonfordroid/toolchain.py”,主文件第1075行
工具链cl()
文件“/home/kivy/Downloads/Camera/python for android master/pythonfordroid/toolchain.py”,第577行,在__
getattr(self,args.subparser_name.replace('-','''.'))(args)
文件“/home/kivy/Downloads/Camera/python for android master/pythonfordroid/toolchain.py”,第151行,在wrapper_func中
从参数(ctx,dist,args)生成参数
文件“/home/kivy/Downloads/Camera/python for android master/pythonfordroid/toolchain.py”,第200行,来自参数的内部版本
构建配方(构建顺序、python模块、ctx)
文件“pythonforandroid/build.py”,第540行,内建配方
下载文件“pythonfordroid/recipe.py”,第297行,如有必要
下载文件“pythonfordroid/recipe.py”,第343行
下载文件中第158行的文件“pythonfordroid/recipe.py”
文件“/usr/lib/python2.7/urllib.py”,第240行,检索
fp=self.open(url、数据)
文件“/usr/lib/python2.7/urllib.py”,第208行,打开
返回getattr(self,name)(url)
文件“/usr/lib/python2.7/urllib.py”,第437行,在OpenHTTPS中
h、 端头(数据)
文件“/usr/lib/python2.7/httplib.py”,第1013行,在endheaders中
自发送输出(消息体)
文件“/usr/lib/python2.7/httplib.py”,第864行,在发送输出中
self.send(msg)
文件“/usr/lib/python2.7/ht