I am making an android application using kivy and kivymd. So i followed all the instructions on the documentation page of buildozer and I am facing an error. The modules that I have used are kivy,kivymd,datetime,sqlite3
(All of which are written in pure python or contain a recipe).
I have typed all of this inside the buildozer.spec file.
I am running buildozer inside a virtual environment that has python 3.7 on the lastest release of Ubuntu(20)
This is what appear before the error:
[INFO]: -> running python3 -m venv venv
[INFO]: Upgrade pip to latest version
[INFO]: -> running bash -c source venv/bin/activate && pip install -U pip
[INFO]: Install Cython in case one of the modules needs it to build
[INFO]: -> running bash -c venv/bin/pip install Cython
[INFO]: Creating a requirements.txt file for the Python modules
[INFO]: Installing Python modules with pip
[INFO]: IF THIS FAILS, THE MODULES MAY NEED A RECIPE. A reason for this is often modules compiling native code that is unaware of Android cross-compilation and does not work without additional changes / workarounds.
[INFO]: -> running bash -c venv/bin/pip install -v --target '/home/guhan/...(and 146 more)
working: Removed build tracker: '/tmp/pip-req-tracker-e95kbahw'
And this is the errors after that
Exception information:
Traceback (most recent call last):
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
status = self.run(options, args)
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
return func(self, options, args)
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 324, in run
requirement_set = resolver.resolve(
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
abstract_dist = _get_prepared_distribution(
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 40, in prepare_distribution_metadata
self.req.prepare_metadata()
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 554, in prepare_metadata
self.metadata_directory = self._generate_metadata()
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 529, in _generate_metadata
return generate_metadata_legacy(
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 70, in generate_metadata
call_subprocess(
File "/home/guhan/Documents/Program-files/Remainder_App/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Removed ast from https://files.pythonhosted.org/packages/4b/fb/2b954d2a38c9a0ef1da6a46737a75b4dbf6f60e5dad0f267a4ec5ece20de/AST-0.0.2.tar.gz#sha256=dc5b79c6ba11aea72c59c791a0bc5ae483b4c18fec6f643002d6fae24361eba0 (from -r requirements.txt (line 1)) from build tracker '/tmp/pip-req-tracker-e95kbahw'
Removed build tracker: '/tmp/pip-req-tracker-e95kbahw'
The same error apears twice in the log
datetime
is a built-in python module which comes with python. You need not specify it in the requirements
of your buildozer.spec
file. Just remove it from requirements and re-run buildozer.