【问题标题】:Buildozer compilation ERROR: No matching distribution found for hostpython2 (from -r requirements.txt (line 2))Buildozer 编译错误:没有为 hostpython2 找到匹配的发行版(来自 -r requirements.txt(第 2 行))
【发布时间】:2020-05-17 00:37:53
【问题描述】:

我是 Kivy 的新手,正在尝试在 Ubuntu Linux 18.04 上使用 Buildozer 将一个简单的应用程序编译成一个 Android apk。但是,我遇到了以下错误:

ERROR: Could not find a version that satisfies the requirement hostpython2 (from -r requirements.txt (line 2)) (from versions: none)
ERROR: No matching distribution found for hostpython2 (from -r requirements.txt (line 2))

buildozer.spec 文件列出了要求:

requirements = python3,kivy,android,kivmob,hostpython2,jnius

我尝试了以下方法:

python3 -m pip install hostpython2

错误:

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/hostpython2/

尝试升级 Buildozer:

pip3 install -U buildozer

已经是最新版本。同样的错误仍然存​​在。

请帮助解决此问题。我无法编译apk。最近 2 天尝试,但每一步都出现很多错误。

【问题讨论】:

  • 如果忽略hostpython2 要求会怎样?
  • 我没试过。这是 KivMob 要求的一部分。但是,我想我注意到 hostpython3 已作为编译过程的一部分安装。
  • 我试图测试 KivMob 是否与 Kivy 一起在 Android 上显示 Google Ad Mob。

标签: android python-3.x kivy buildozer


【解决方案1】:

“hostpython2”已弃用。将它从 buildozer.spec 文件中指定的要求中删除,并包含“python3”,而不是导致“hostpython3”的编译。重新编译了代码,成功克服了这一步。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-18
    • 2021-04-18
    • 1970-01-01
    • 2020-03-27
    • 1970-01-01
    • 2019-03-20
    • 1970-01-01
    相关资源
    最近更新 更多