Buildozer compilation ERROR: No matching distribution found for hostpython2 (from -r requirements.txt (line 2))

59 views
Skip to first unread message

Shoumik Das

unread,
May 15, 2020, 5:25:07 AM5/15/20
to Kivy users support

I am new to Kivy and trying to compile a simple app into an Android apk using Buildozer on Ubuntu Linux 18.04. However, I am stuck at the following error:


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))

The buildozer.spec file lists the requirements:


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

I tried the following:

python3 -m pip install hostpython2

Error:

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

Tried to upgrade Buildozer:

pip3 install -U buildozer

Already the latest version. The same error persists.


Please help to resolve this issue. I am unable to compile the apk. Trying for the last 2 days but getting a lot of errors at every step. Resolving and moving on each time.

Robert Flatt

unread,
May 15, 2020, 4:28:30 PM5/15/20
to Kivy users support
hostpython2 is depreciated.

The message is not about the Python packages installed on your desktop (which is why the things you tried didn't work)
The message is about the packages used on Android. In this case the base Python2 package, but Python 2 is depreciated.

It is a conflict to have python3 and hostpython2 in the requirements. There should only be python3.

The answer is to remove hostpython2.
But if it is there for a reason (say the app is written for Python2)  then there will be concequences......

Shoumik Das

unread,
May 16, 2020, 5:29:01 AM5/16/20
to Kivy users support
Hi Rob, thank you for helping me understand.
Reply all
Reply to author
Forward
0 new messages