Skip to content

Error message about python2 #2001

Closed
Closed

Description

@noembryo

Trying to compile an apk using buildozer 0.39. I get a strange error:

# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=XXXXXX --bootstrap=sdl2 --requirements=python2,kivy,sqlite3,requests,feedparser,html2bbcode --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/4Build/XXXXXX/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/kivy/4Build/XXXXXX/.buildozer/android/platform/python-for-android
[ERROR]:   Build failed: python-for-android no longer supports running under Python 2. Either upgrade to Python 3.4 or higher (recommended), or revert to python-for-android 2019.07.08. Note that you *can* still target Python 2 on Android by including python2 in your requirements.

The command I use includes the python2 requirement, but python-for-android says its not...

  • Python: 2.7.15+
  • OS: Ubuntu 18.04 VM

Activity

  1. inclement commented on Oct 13, 2019

    @inclement
    Member

    You are running buildozer/p4a using python2. Uninstall buildozer, install it with python3, and run again.

  2. noembryo commented on Oct 13, 2019

    @noembryo
    Author

    I did that and did not work also..
    So I converted the project to Python 3 and buildozer worked OK.
    Thanks for your time.. :o)

  3. noembryo commented on Oct 13, 2019

    @noembryo
    Author

    BTW the VM I found here works OK, but is there another one (more official or newer) somewhere else?

  4. AndreMiras commented on Oct 13, 2019

    @AndreMiras
    Member

    @noembryo we're still experimenting building with docker.
    There's a docker image here https://hub.docker.com/r/kivy/buildozer if you want to play with. But the process is still undocumented

  5. noembryo commented on Oct 13, 2019

    @noembryo
    Author

    Hm, never used docker before..
    Maybe I'll try it in the future (yet another thing to learn ;o)
    Thanks

  6. AndreMiras commented on Oct 13, 2019

    @AndreMiras
    Member

    There're definitely things to improve in the process and also we need to document it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions