qpython吧 关注:2,530贴子:2,658
  • 7回复贴,共1

android上能装buildozer吗?

只看楼主收藏回复

用kivy做的界面写了一个小应用,主要也是针对android平台的,可是打包程序比写程序还难,总不能一直在qpython上就自己运行吧。
折腾打包的过程,虚拟机安装各种操作系统,使用各种命令各种工具,折腾到最后还是各种英文出错。我想大家开发程序最终也会要打包发布供更多的人使用吧?大家一起攻坚克难,把打包app这个步骤拿下。
大家可以谈自己的经验,或者是弄资料过来,让吧里老老少少从一开始就能学会打包,而不是辛苦开发半年,最终毁于打包。
当然最好是直接在手机上就能打包,现在有手机比有电脑的多。


1楼2017-03-04 12:39回复
    刚才自己在手机上试了一下安装buildozer成功,顺便把步骤写下来。
    第一步(必须):手机上先连接好vpn,这样才能顺利安装,具体用哪个软件就不提了,自己搜索吧。
    第二步:打开qpython,点击'库',下来的界面点击'Pip console'就自动跳转到了终端界面
    第三步:敲pip install builozer,然后耐心等待直到安装完毕,过程大约2分钟。下面把输出结果贴出来大家参考,因为我手机上接图不方便,所以就直接复制了。
    .sh "/data/data/org.qpython.qpy/files/bin/pip_console.py" && exit <
    Input pip commands, ie: pip install {module}
    -->pip install buildozer
    Downloading/unpacking buildozer
    Downloading buildozer-0.32.tar.gz (59Kb): 59Kb downloaded
    Running setup.py egg_info for package buildozer
    warning: no files found matching '*COPYING'
    Downloading/unpacking pexpect (from buildozer)
    Downloading pexpect-4.2.1.tar.gz (143Kb): 143Kb downloaded
    Running setup.py egg_info for package pexpect
    Downloading/unpacking virtualenv (from buildozer)
    Downloading virtualenv-15.1.0.tar.gz (1.9Mb): 1.9Mb downloaded
    Running setup.py egg_info for package virtualenv
    warning: no previously-included files matching '*' found under directory 'docs/_templates'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    Downloading/unpacking ptyprocess>=0.5 (from pexpect->buildozer)
    Downloading ptyprocess-0.5.1.tar.gz (68Kb): 68Kb downloaded
    Running setup.py egg_info for package ptyprocess
    Installing collected packages: buildozer, pexpect, virtualenv, ptyprocess
    Running setup.py install for buildozer
    warning: no files found matching '*COPYING'
    installing library code to build/bdist.linux-armv7l/egg
    warning: build_py: byte-compiling is disabled, skipping.
    warning: install_lib: byte-compiling is disabled, skipping.
    zip_safe flag not set; analyzing archive contents...
    removing 'build/bdist.linux-armv7l/egg' (and everything under it)
    Processing buildozer-0.32-py2.7.egg
    Extracting buildozer-0.32-py2.7.egg to /data/data/org.qpython.qpy/files/lib/python2.7/site-packages
    warning: easy_install: byte-compiling is disabled, skipping.
    Adding buildozer 0.32 to easy-install.pth file
    Installing buildozer script to /data/data/org.qpython.qpy/files/bin
    Installing buildozer-remote script to /data/data/org.qpython.qpy/files/bin
    Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/buildozer-0.32-py2.7.egg
    Processing dependencies for buildozer==0.32
    Searching for virtualenv
    Reading http://pypi.python.org/simple/virtualenv/
    Best match: virtualenv 15.1.0
    Downloading https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz#md5=44e19f4134906fe2d75124427dc9b716
    Processing virtualenv-15.1.0.tar.gz
    Running virtualenv-15.1.0/setup.py -q bdist_egg --dist-dir /storage/emulated/0/org.qpython.qpy/cache/easy_install-230sRF/virtualenv-15.1.0/egg-dist-tmp-VvuMQe
    warning: no previously-included files matching '*' found under directory 'docs/_templates'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: build_py: byte-compiling is disabled, skipping.
    warning: install_lib: byte-compiling is disabled, skipping.
    warning: easy_install: byte-compiling is disabled, skipping.
    Adding virtualenv 15.1.0 to easy-install.pth file
    Installing virtualenv script to /data/data/org.qpython.qpy/files/bin
    Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg
    Searching for pexpect
    Reading http://pypi.python.org/simple/pexpect/
    Best match: pexpect 4.2.1
    Downloading https://pypi.python.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz#md5=3694410001a99dff83f0b500a1ca1c95
    Processing pexpect-4.2.1.tar.gz
    Running pexpect-4.2.1/setup.py -q bdist_egg --dist-dir /storage/emulated/0/org.qpython.qpy/cache/easy_install-iqXof6/pexpect-4.2.1/egg-dist-tmp-8NRRU2


    2楼2017-03-04 20:07
    回复
      2026-01-04 18:47:09
      广告
      不感兴趣
      开通SVIP免广告
      warning: build_py: byte-compiling is disabled, skipping.
      warning: install_lib: byte-compiling is disabled, skipping.
      zip_safe flag not set; analyzing archive contents...
      warning: easy_install: byte-compiling is disabled, skipping.
      Adding pexpect 4.2.1 to easy-install.pth file
      Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/pexpect-4.2.1-py2.7.egg
      Searching for ptyprocess>=0.5
      Reading http://pypi.python.org/simple/ptyprocess/
      Best match: ptyprocess 0.5.1
      Downloading https://pypi.python.org/packages/db/d7/b465161910f3d1cef593c5e002bff67e0384898f597f1a7fdc8db4c02bf6/ptyprocess-0.5.1.tar.gz#md5=94e537122914cc9ec9c1eadcd36e73a1
      Processing ptyprocess-0.5.1.tar.gz
      Running ptyprocess-0.5.1/setup.py -q bdist_egg --dist-dir /storage/emulated/0/org.qpython.qpy/cache/easy_install-SxjULz/ptyprocess-0.5.1/egg-dist-tmp-hgzpxg
      warning: build_py: byte-compiling is disabled, skipping.
      warning: install_lib: byte-compiling is disabled, skipping.
      zip_safe flag not set; analyzing archive contents...
      warning: easy_install: byte-compiling is disabled, skipping.
      Adding ptyprocess 0.5.1 to easy-install.pth file
      Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/ptyprocess-0.5.1-py2.7.egg
      Finished processing dependencies for buildozer==0.32
      Could not find .egg-info directory in install record for buildozer
      Running setup.py install for pexpect
      installing library code to build/bdist.linux-armv7l/egg
      warning: build_py: byte-compiling is disabled, skipping.
      warning: install_lib: byte-compiling is disabled, skipping.
      zip_safe flag not set; analyzing archive contents...
      removing 'build/bdist.linux-armv7l/egg' (and everything under it)
      Processing pexpect-4.2.1-py2.7.egg
      removing '/data/data/org.qpython.qpy/files/lib/python2.7/site-packages/pexpect-4.2.1-py2.7.egg' (and everything under it)
      Extracting pexpect-4.2.1-py2.7.egg to /data/data/org.qpython.qpy/files/lib/python2.7/site-packages
      warning: easy_install: byte-compiling is disabled, skipping.
      pexpect 4.2.1 is already the active version in easy-install.pth
      Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/pexpect-4.2.1-py2.7.egg
      Processing dependencies for pexpect==4.2.1
      Searching for ptyprocess==0.5.1
      Best match: ptyprocess 0.5.1
      Processing ptyprocess-0.5.1-py2.7.egg
      ptyprocess 0.5.1 is already the active version in easy-install.pth
      Using /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/ptyprocess-0.5.1-py2.7.egg
      Finished processing dependencies for pexpect==4.2.1
      Could not find .egg-info directory in install record for pexpect (from buildozer)
      Running setup.py install for virtualenv
      warning: no previously-included files matching '*' found under directory 'docs/_templates'
      warning: no previously-included files matching '*' found under directory 'docs/_build'
      installing library code to build/bdist.linux-armv7l/egg
      warning: build_py: byte-compiling is disabled, skipping.
      warning: install_lib: byte-compiling is disabled, skipping.
      removing 'build/bdist.linux-armv7l/egg' (and everything under it)
      Processing virtualenv-15.1.0-py2.7.egg
      removing '/data/data/org.qpython.qpy/files/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg' (and everything under it)
      Extracting virtualenv-15.1.0-py2.7.egg to /data/data/org.qpython.qpy/files/lib/python2.7/site-packages
      warning: easy_install: byte-compiling is disabled, skipping.
      virtualenv 15.1.0 is already the active version in easy-install.pth
      Installing virtualenv script to /data/data/org.qpython.qpy/files/bin
      Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg
      Processing dependencies for virtualenv==15.1.0
      Finished processing dependencies for virtualenv==15.1.0
      Could not find .egg-info directory in install record for virtualenv (from buildozer)
      Running setup.py install for ptyprocess
      installing library code to build/bdist.linux-armv7l/egg
      warning: build_py: byte-compiling is disabled, skipping.
      warning: install_lib: byte-compiling is disabled, skipping.
      zip_safe flag not set; analyzing archive contents...
      removing 'build/bdist.linux-armv7l/egg' (and everything under it)
      Processing ptyprocess-0.5.1-py2.7.egg
      removing '/data/data/org.qpython.qpy/files/lib/python2.7/site-packages/ptyprocess-0.5.1-py2.7.egg' (and everything under it)
      Extracting ptyprocess-0.5.1-py2.7.egg to /data/data/org.qpython.qpy/files/lib/python2.7/site-packages
      warning: easy_install: byte-compiling is disabled, skipping.
      ptyprocess 0.5.1 is already the active version in easy-install.pth
      Installed /data/data/org.qpython.qpy/files/lib/python2.7/site-packages/ptyprocess-0.5.1-py2.7.egg
      Processing dependencies for ptyprocess==0.5.1
      Finished processing dependencies for ptyprocess==0.5.1
      Could not find .egg-info directory in install record for ptyprocess>=0.5 (from pexpect->buildozer)
      Successfully installed buildozer pexpect virtualenv ptyprocess
      Cleaning up...
      -->
      安装完成,然后退到python主界面,点击终端,导入测试一下:
      >>> import buildozer
      >>>
      没有错误,没有警告,完美导入。


      3楼2017-03-04 20:07
      回复
        一点小支持,不成敬意,望笑纳.


        IP属地:陕西来自Android客户端4楼2017-03-07 08:33
        回复
          告诉大家一个好消息和坏消息。
          经过上面的试验,buildozer已经在qpython上安装并可以使用了。
          使用的过程:
          1.打开控制台
          2.import os
          3.os.system("sh")
          4.cd /your_phone/org.qpython.qpy/to/<your_demo>
          5.buildozer init
          第五步之后在你的项目文件夹下确实生成了.spec配置文件(然后你自己修改,至少3项应用名称,包名称,版本)
          6.buildozer -v andrdoid debug
          运行到这一步最终打包步骤,python报了一个错[errno 13],查了一下是权限问题。我的手机是none-root的。
          到这里我的卡住了,有能折腾的顶上。


          5楼2017-03-09 10:36
          回复
            电脑怎么配置 我还不会


            来自Android客户端6楼2017-03-09 16:00
            收起回复
              还是在电脑上做比较容易,windows应该可以吧,整套都是跨平台的啊。linux,windows,mac应该都可以~~
              估计也就打包ios需要mac平台。


              IP属地:山东8楼2017-12-04 10:43
              回复