编译 apk 时出现 Buildozer 错误 - pip ssl

Buildozer error while compiling apk - pip ssl

我正在尝试使用 Buildozer 将一个简单的程序编译成 Android 的 apk,但是 运行 遇到了以下问题。你能帮忙吗?我尝试升级 pip 但没有成功 help:python3 -m pip install --upgrade pip

所以,我又回到了原来的 pip 版本。

单独安装Cython:pip3 install Cython

但同样的问题仍然存在。我很茫然。 :-(

命令:buildozer android debug

RAN: /bin/bash -c 'venv/bin/pip install Cython'
STDOUT:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

我该如何解决这个问题?

Could not fetch URL https://pypi.org/simple/cython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cython/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement Cython (from versions: none)
ERROR: No matching distribution found for Cython
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

这是最近的一个错误,您需要使用 apt install libssl-dev

安装 libssl-dev

那么您可能还想通过 运行 rm -rf .buildozer 在包含您的 buildozer.spec 文件的目录中清理您的 buildozer 目录。

应该可以!