gpt4 book ai didi

android - 如何获取 python-for-android 的安装程序脚本以识别 Windows 系统上已安装的 pbs?

转载 作者:可可西里 更新时间:2023-11-01 14:35:34 29 4
gpt4 key购买 nike

我正在尝试使用说明安装 Python-for-Android given here .我的目标是为基于 Pygame 的游戏构建一个 APK 文件,该文件已准备就绪并可以在 Python 中运行。我在 Windows 10 Home 32 位系统上运行 Python 2.7.11 32 位。

如这里所见,由于我使用的是 Windows 系统,因此最初被告知要安装 pbs。我这样做了,安装似乎成功进行了。

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>CD C:\Users\RetailAdmin

C:\Users\RetailAdmin>pip install git+https://github.com/kivy/python-for-android.git
Collecting git+https://github.com/kivy/python-for-android.git
Cloning https://github.com/kivy/python-for-android.git to c:\users\retail~1\appdata\local\temp\pip-g81ofc-build
Collecting appdirs (from python-for-android==0.3)
Downloading appdirs-1.4.0-py2.py3-none-any.whl
Collecting colorama>=0.3.3 (from python-for-android==0.3)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting sh>=1.10 (from python-for-android==0.3)
Downloading sh-1.11.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\retail~1\appdata\local\temp\pip-build-ihr19r\sh\setup.py", line 4, in <module>
import sh
File "sh.py", line 37, in <module>
support." % __version__)
ImportError: sh 1.11 is currently only supported on linux and osx. please install pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows support.

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\retail~1\appdata\local\temp\pip-build-ihr19r\sh\

C:\Users\RetailAdmin>pip install pbs
Collecting pbs
Downloading pbs-0.110.tar.gz
Building wheels for collected packages: pbs
Running setup.py bdist_wheel for pbs ... done
Stored in directory: C:\Users\RetailAdmin\AppData\Local\pip\Cache\wheels\83\a4\ed\de1e93a8fd1250a18a2d3fe79b07755188cfc1538144a6cc46
Successfully built pbs
Installing collected packages: pbs
Successfully installed pbs-0.110

但是,当我尝试再次运行第一个命令(用于安装 python-for-android)时,安装脚本仍然无法识别已安装 pbs。返回与上面给出的非常相似的输出,主要区别在于它没有再次下载 appdirs/colorama 等,而是使用缓存的副本。它最终仍然选择 sh 1.11,然后建议选择 pbs 0.110,因为它是 Windows 系统。

我已经确认,即使我关闭命令提示符(以管理员身份运行)并启动新 session (再次以管理员身份),此行为仍会继续。我还查看了给出的命令文档 here但是没有什么特定于 pbs 或 sh 甚至 Windows 本身。更让我困惑的是,上面提到的快速启动页面列出了许多依赖项,但它们也没有谈论 pbs 或 sh。我已验证安装工具已安装。

最佳答案

python-for-android is not supported on Windows.

This is just the first small example of many issues you'll come across if you try it.There's a PR that does a lot of the work, but it's considered just aproof of concept unless someone wants to polish it and maintain it.

https://github.com/kivy/python-for-android/issues/1817

关于android - 如何获取 python-for-android 的安装程序脚本以识别 Windows 系统上已安装的 pbs?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37795788/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com