Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildozer Install python 3.8.1 #1090

Closed
TSoer opened this issue May 6, 2020 · 8 comments
Closed

buildozer Install python 3.8.1 #1090

TSoer opened this issue May 6, 2020 · 8 comments

Comments

@TSoer
Copy link

TSoer commented May 6, 2020

Versions

  • Python: 3.7.5
  • OS: Xubuntu
  • Buildozer: 1.0.1

Description

When you start buildozer. Installs python 3.8.1 I have a suspicion that because of this I get a ReferenceError error. How do I set preferences so that apk builds on python <3.8?

@TSoer TSoer changed the title buildozer. Installs python 3.8.1 buildozer Install python 3.8.1 May 7, 2020
@tshirtman
Copy link
Member

you should be able to set the python version in buildozer.spec by putting for example python==3.7.5 in the requirements line.

@TSoer
Copy link
Author

TSoer commented May 7, 2020

Yes, I did as you said

requirements = python==3.7.6,kivy,kivymd==0.104.0,sqlite3

But while buildozer is running, you can see the logs

[INFO]: Downloading hostpython3
[INFO]: -> running mkdir -p /home/kivy/compil/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]: -> directory context /home/kivy/compil/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]: -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]: -> running rm -f .mark-Python-3.8.1.tgz
[INFO]: Downloading hostpython3 from https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]: -> running touch .mark-Python-3.8.1.tgz
[INFO]: <- directory context /home/kivy/compil/.buildozer/android/platform/python-for-android

after buildozer downloads work on errors

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

Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=PHU --bootstrap=sdl2 --requirements=python==3.7.6,kivy,kivymd==0.104.0,sqlite3 --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/compil/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21

Thank you in advance

@AndreMiras
Copy link
Member

Oops yes, it should be python3==3.7.5 (note the 3). We should probably re-alias this as we only support python3 recipe anyway.

@AndreMiras
Copy link
Member

Could you please share the actual log still. Please share the complete log including the buildozer.spec file

@TSoer
Copy link
Author

TSoer commented May 7, 2020

@AndreMiras
buildozerSpec.txt
buildzerLog.txt
After building apk. I started getting other errors. and the application on the phone does not start, so I can’t say with confidence that I’ve packed python 3.7.6, but pay attention to the buildozerLog file, it can be seen that python 3.8.1 will be downloaded

@AndreMiras
Copy link
Member

Oh OK thanks, I wanted to see the logs because earlier you said (deleted?) the error was the same with python3==3.7.5 and I had my doubt that's why I needed the full log 😅
If the issue you have now is a runtime one, then this task can be closed since it's solved right?
For the runtime issue you also need to check the logs. But it could really be "just" this:
kivy/python-for-android#2169
#1091
kivy/python-for-android#2167

@TSoer
Copy link
Author

TSoer commented May 8, 2020

Your settings. Collect apk files that do not work.

@TSoer
Copy link
Author

TSoer commented May 11, 2020

In order to select the python version. The argument python3 == 3.7.5 is not enough. In the buildozer.spec file, the requirements section must additionally specify hostpython3 == 3.7.5. An example is presented below

requirements = hostpython3==3.7.5,python3==3.7.5,kivy,kivymd,sqlite3

@TSoer TSoer closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants