Skip to content

'Context' object has no attribute 'hostpython' #1073

Closed

Description

@maquedexiju

I've checked the issues before, and I use the command below
p4a apk —private /Users/XuXiaotian/Git/DaytimeLog —package=com.xiaotian.daytimelog —name “Daytime Log” —version 2.1 —bootstrap=sdl2 —requirements=python3crystax,kivy --arch=armeabi-v7a

But it won't help, I use Python3.6 and the newest Android SDK.
Need help.

Activity

  1. inclement commented on Jul 8, 2017

    @inclement
    Member

    Are you using the latest python-for-android master branch?

  2. maquedexiju commented on Jul 8, 2017

    @maquedexiju
    Author

    Yes, I just install it from git today, do you need any other infomations?

  3. maquedexiju commented on Jul 8, 2017

    @maquedexiju
    Author

    [INFO]: Copying python distribution
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.6/bin/p4a", line 11, in
    load_entry_point('python-for-android==0.5', 'console_scripts', 'p4a')()
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pythonforandroid/toolchain.py", line 906, in main
    ToolchainCL()
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pythonforandroid/toolchain.py", line 512, in init
    getattr(self, args.subparser_name.replace('-', '_'))(args)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pythonforandroid/toolchain.py", line 192, in build_dist_from_args
    ctx.bootstrap.run_distribute()
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pythonforandroid/bootstraps/pygame/init.py", line 48, in run_distribute
    hostpython = sh.Command(self.ctx.hostpython)
    AttributeError: 'Context' object has no attribute 'hostpython'

    Hop this can help you

  4. maquedexiju commented on Jul 8, 2017

    @maquedexiju
    Author

    Seems that the problem is that I input the command in my evernote first, when I copy that to the terminal, the "--" is converted to "-", and the paras can't be recognized then.

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