Reputation: 1
I tried to make an apk via Buildozer using Kivy's Buildozer VM, but got an error:
Welcome to the Buildozer Virtual Machine.
Please see ~/Desktop/README.txt for more information
kivy@kivy-VirtualBox:~$ cd /home/kivy/Desktop/myapp
kivy@kivy-VirtualBox:~/Desktop/myapp$ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian `dpkg' package management program version 1.17.5 (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-7-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool
# Install platform
# Run '/usr/bin/python -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\''
# Cwd None
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'enum34; python_version<"3.4"', 'at', '; python_version<"3.4"')
Storing debug log for failure in /tmp/tmpaweUPh
# Command failed: /usr/bin/python -m pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six' 'enum34; python_version<"3.4"' 'sh>=1.10; sys_platform!="nt"'
#
# 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@kivy-VirtualBox:~/Desktop/myapp$
I already upgraded appdirs, colorama, jinja2, six, sh, etc.
I think the main problem is that Buildozer is using python version 2.7. How can I manually change it to python version 3+?
Upvotes: 0
Views: 781
Reputation: 39824
I'm not familiar w/ buildozer, but in Project description I see:
Installing Buildozer with target Python 3 (default):
...
Installing Buildozer with target Python 2
Follow the same installation and buildozer init as Python 3
Make sure the following lines are in your buildozer.spec file.:
# Changes python3 to python2 requirements = python2,kivy
So one thing to try would be to check the buildozer.spec
file for the quoted snippet and, if there, revert it.
Upvotes: 1