有没有办法在Android上运行Python?

发布于 2024-07-05 20:38:57 字数 271 浏览 3 评论 0 原文

我们正在开发 S60 版本,这个平台有一个很好的 Python API。

然而,关于 Android 上的 Python 没有任何官方信息,但既然 Jython 存在,有没有办法让蛇和机器人一起工作??

We are working on an S60 version and this platform has a nice Python API..

However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(23

晚雾 2024-07-12 20:38:57

作为一个 Python 爱好者和 Android 程序员,我很遗憾地说这不是一个好方法。 有两个问题:

一个问题是 Android 开发工具不仅仅是一种编程语言。 许多 Android 图形都涉及 XML 文件来配置显示,类似于 HTML。 内置的 java 对象与此 XML 布局集成在一起,这比编写从逻辑到位图的代码要容易得多。

另一个问题是 G1(可能还有不久的将来的其他 Android 设备)速度没有那么快。 200 MHz 处理器和 RAM 非常有限。 即使在 Java 中,如果您想让您的应用程序完美流畅,也必须进行大量重写以避免创建更多对象。 Python 在移动设备上的运行速度在一段时间内仍然会太慢。

As a Python lover and Android programmer, I'm sad to say this is not a good way to go. There are two problems:

One problem is that there is a lot more than just a programming language to the Android development tools. A lot of the Android graphics involve XML files to configure the display, similar to HTML. The built-in java objects are integrated with this XML layout, and it's a lot easier than writing your code to go from logic to bitmap.

The other problem is that the G1 (and probably other Android devices for the near future) are not that fast. 200 MHz processors and RAM is very limited. Even in Java, you have to do a decent amount of rewriting-to-avoid-more-object-creation if you want to make your app perfectly smooth. Python is going to be too slow for a while still on mobile devices.

雨巷深深 2024-07-12 20:38:57

使用 SL4A(已在其他答案中自行提及),您可以运行 一个成熟的 web2py 实例(其他 Python Web 框架 也可能是候选者)。 SL4A 不允许您执行本机 UI 组件(按钮、滚动条等),但它确实支持 WebViews。 WebView 基本上只不过是指向固定地址的条带化 Web 浏览器。 我相信原生 Gmail 应用程序使用 WebView,而不是采用常规的小部件路线。

这条路线将有一些有趣的功能:

  • 对于大多数 python Web 框架,您实际上可以在不使用 Android 设备或 Android 模拟器的情况下进行开发和测试。
  • 无论您最终为手机编写什么 Python 代码,都可以将其放在公共网络服务器上,只需进行很少(如果有的话)修改。
  • 您可以利用所有疯狂的网络内容:查询、HTML5、CSS3 等。

Using SL4A (which has already been mentioned by itself in other answers) you can run a full-blown web2py instance (other python web frameworks are likely candidates as well). SL4A doesn't allow you to do native UI components (buttons, scroll bars, and the like), but it does support WebViews. A WebView is basically nothing more than a striped down web browser pointed at a fixed address. I believe the native Gmail app uses a WebView instead of going the regular widget route.

This route would have some interesting features:

  • In the case of most python web frameworks, you could actually develop and test without using an android device or android emulator.
  • Whatever Python code you end up writing for the phone could also be put on a public webserver with very little (if any) modification.
  • You could take advantage of all of the crazy web stuff out there: query, HTML5, CSS3, etc.
信愁 2024-07-12 20:38:57

在过去的几年里,使用 Python 制作 Android 应用程序已经取得了长足的进步。

一种新方法是使用Python 的 FireMonkey (FMX) 框架。 FMX 是一个 GUI 框架,用于为许多平台开发应用程序,Android 就是其中之一。

完成编程后,您可以使用 PythonFMXBuilder 来构建 Android 应用程序。

Making Android apps with Python has come a long way in the past couple of years.

One new way is using the FireMonkey (FMX) framework for Python. FMX is a GUI framework for developing apps for many platforms, with Android being one of them.

You can use PythonFMXBuilder to build your Android App once you're finished programming it.

胡渣熟男 2024-07-12 20:38:57

Pygame Subset for Android

Pygame 是一个适用于 Python(桌面)的 2D 游戏引擎,深受新程序员的欢迎。 Android 版 Pygame 子集 将自己描述为...

...将 Pygame 功能的子集移植到 Android 平台。 该项目的目标是允许创建 Android 专用游戏,并简化将游戏从类 PC 平台移植到 Android 的过程。

这些示例包括打包为 APK 的完整游戏,非常有趣。

Pygame Subset for Android

Pygame is a 2D game engine for Python (on desktop) that is popular with new programmers. The Pygame Subset for Android describes itself as...

...a port of a subset of Pygame functionality to the Android platform. The goal of the project is to allow the creation of Android-specific games, and to ease the porting of games from PC-like platforms to Android.

The examples include a complete game packaged as an APK, which is pretty interesting.

陌伤ぢ 2024-07-12 20:38:57

一种方法是使用 Kivy

用于快速开发应用程序的开源Python库
利用创新的用户界面,例如多点触控应用程序。

Kivy 可以在 Linux、Windows、OS X、Android 和 iOS 上运行。 您可以在所有支持的平台上运行相同的 [python] 代码。

Kivy Showcase 应用

One way is to use Kivy:

Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.

Kivy runs on Linux, Windows, OS X, Android and iOS. You can run the same [python] code on all supported platforms.

Kivy Showcase app

寄居人 2024-07-12 20:38:57

还有新的 Android 脚本环境 (ASE/SL4A) 项目。 它看起来棒极了,并且与原生 Android 组件进行了一些集成。

注意:不再处于“积极开发”状态,但某些分叉可能处于“积极开发”状态。

There is also the new Android Scripting Environment (ASE/SL4A) project. It looks awesome, and it has some integration with native Android components.

Note: no longer under "active development", but some forks may be.

预谋 2024-07-12 20:38:57

是的! :Android 脚本环境

示例via Matt Cutts via SL4A --“这是一个用六行 Python 代码编写的条形码扫描仪:

import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = "http://books.google.com?q=%d" % isbn
droid.startActivity('android.intent.action.VIEW', url)

Yes! : Android Scripting Environment

An example via Matt Cutts via SL4A -- "here’s a barcode scanner written in six lines of Python code:

import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = "http://books.google.com?q=%d" % isbn
droid.startActivity('android.intent.action.VIEW', url)
各自安好 2024-07-12 20:38:57

Android 脚本层

SL4A 可以满足您的需求。 您可以轻松地从他们的网站将其直接安装到您的设备上,并且不需要 root。

它支持多种语言。 Python是最成熟的。 默认情况下,它使用 Python 2.6,但有一个 3.2 端口 你可以用它来代替。 我在 Galaxy S2 上使用该端口进行各种操作,效果很好。

API

SL4A 为每种支持的语言提供了 android 库的端口。 该库通过单个 Android 对象提供底层 Android API 的接口。

from android import Android

droid = Android()
droid.ttsSpeak('hello world') # example using the text to speech facade

每种语言都有几乎相同的 API。 您甚至可以在 webviews 中使用 JavaScript API。

let droid = new Android();
droid.ttsSpeak("hello from js");

用户界面

对于用户界面,您有三个选项:

  • 您可以通过
    API。 这对于确认对话和其他基本用户输入很有用。
  • 您还可以从 Python 脚本内部打开 Web 视图,然后使用 HTML5
    用于用户界面。 当你使用 Python 中的 webviews 时,你可以通过
    在 webview 和 Python 进程之间来回消息
    催生了它。 UI 不会是原生的,但它仍然是一个不错的选择
    有。
  • 对原生 Android 用户界面有一些支持,但我不支持
    确定它的效果如何; 我只是从来没有使用过它。

您可以混合选项,这样您就可以拥有主界面的网络视图,并且仍然使用本机对话。

QPython

有一个名为 QPython 的第三方项目。 它建立在 SL4A 的基础上,并添加了一些其他有用的东西。

QPython 为您提供了一个更好的 UI 来管理您的安装,并包括一个小型触摸屏代码编辑器、一个 Python shell 和一个用于包管理的 PIP shell。 他们还有一个 Python 3 端口。 这两个版本均可从 Play 商店免费获得。 QPython 还捆绑了 Android 项目上的大量 Python 库,包括 Kivy,因此它不仅仅是 SL4A。

请注意,QPython 仍在开发 SL4A 的分支(尽管说实话,并没有太多进展)。 主要的 SL4A 项目本身几乎已经死了。

有用链接

Scripting Layer for Android

SL4A does what you want. You can easily install it directly onto your device from their site, and do not need root.

It supports a range of languages. Python is the most mature. By default, it uses Python 2.6, but there is a 3.2 port you can use instead. I have used that port for all kinds of things on a Galaxy S2 and it worked fine.

API

SL4A provides a port of their android library for each supported language. The library provides an interface to the underlying Android API through a single Android object.

from android import Android

droid = Android()
droid.ttsSpeak('hello world') # example using the text to speech facade

Each language has pretty much the same API. You can even use the JavaScript API inside webviews.

let droid = new Android();
droid.ttsSpeak("hello from js");

User Interfaces

For user interfaces, you have three options:

  • You can easily use the generic, native dialogues and menus through the
    API. This is good for confirmation dialogues and other basic user inputs.
  • You can also open a webview from inside a Python script, then use HTML5
    for the user interface. When you use webviews from Python, you can pass
    messages back and forth, between the webview and the Python process that
    spawned it. The UI will not be native, but it is still a good option to
    have.
  • There is some support for native Android user interfaces, but I am not
    sure how well it works; I just haven't ever used it.

You can mix options, so you can have a webview for the main interface, and still use native dialogues.

QPython

There is a third party project named QPython. It builds on SL4A, and throws in some other useful stuff.

QPython gives you a nicer UI to manage your installation, and includes a little, touchscreen code editor, a Python shell, and a PIP shell for package management. They also have a Python 3 port. Both versions are available from the Play Store, free of charge. QPython also bundles libraries from a bunch of Python on Android projects, including Kivy, so it is not just SL4A.

Note that QPython still develop their fork of SL4A (though, not much to be honest). The main SL4A project itself is pretty much dead.

Useful Links

你的背包 2024-07-12 20:38:57

交叉编译& Ignifuga

我的博客有用于交叉编译的说明和补丁适用于 Android 的 Python 2.7.2。

我还开源了我的 2D 游戏引擎 Ignifuga。 它基于 Python/SDL,并且针对 Android 进行交叉编译。 即使您不将其用于游戏,您也可能会从代码或构建器实用程序(名为 Schafer,以 Tim 命名......你知道谁)中获得有用的想法。

Cross-Compilation & Ignifuga

My blog has instructions and a patch for cross compiling Python 2.7.2 for Android.

I've also open sourced Ignifuga, my 2D Game Engine. It's Python/SDL based, and it cross compiles for Android. Even if you don't use it for games, you might get useful ideas from the code or builder utility (named Schafer, after Tim... you know who).

沙沙粒小 2024-07-12 20:38:57

Termux

您可以使用 Termux 应用程序,F-Droid 链接,为 Android 提供 POSIX 环境,用于安装 Python。

请注意,apt install python 将在 Termux 上安装 Python3。 对于Python2,您需要使用apt install python2

Termux

You can use the Termux app, F-Droid link, which provides a POSIX environment for Android, to install Python.

Note that apt install python will install Python3 on Termux. For Python2, you need to use apt install python2.

守护在此方 2024-07-12 20:38:57

Kivy

我想补充一下 @JohnMudd 写的关于 Kivy 的内容。 他描述的情况已经过去很多年了,Kivy 已经发生了很大的变化。

在我看来,Kivy 最大的卖点是它的跨平台兼容性。 您可以使用任何桌面环境(Windows/*nix 等)对所有内容进行编码和测试,然后将您的应用程序打包到一系列不同的平台,包括 Android、iOS、MacOS 和 Windows(尽管应用程序通常缺乏本机的外观和感觉)。

使用 Kivy 自己的 KV 语言,您可以轻松地编码和构建 GUI 界面(它就像 Java XML,但与 TextView 等不同,KV 有自己的 ui.widgets 进行类似的翻译),在我看来,这很容易采用。

目前 Buildozerpython-for-android 是最推荐的构建和打包应用程序的工具。 我已经尝试过它们,并且可以肯定地说它们使使用 Python 构建 Android 应用程序变得轻而易举。 他们的指南也有详细记录。

iOS是Kivy的另一大卖点。 您可以通过 kivy-ios Homebrew 工具,尽管在设备上运行之前构建需要 Xcode(据我所知 Xcode 中的 iOS 模拟器目前不适用于 x86 架构构建)。 还有一些依赖性问题,必须在 Xcode 中手动编译和摆弄才能成功构建,但解决这些问题并不会太困难,并且 Kivy Google Group 也非常有帮助。

话虽如此,具有良好 Python 知识的用户应该可以毫无问题地快速掌握基础知识。

如果您将 Kivy 用于更严肃的项目,您可能会发现现有模块不能令人满意。 不过,有一些可行的解决方案。 使用(正在进行中的)Android 版 pyjniuspyobjus,用户现在可以访问 Java/Objective-C 类来控制一些原生 API。

Kivy

I wanted to add to what @JohnMudd has written about Kivy. It has been years since the situation he described, and Kivy has evolved substantially.

The biggest selling point of Kivy, in my opinion, is its cross-platform compatibility. You can code and test everything using any desktop environment (Windows/*nix etc.), then package your app for a range of different platforms, including Android, iOS, MacOS and Windows (though apps often lack the native look and feel).

With Kivy's own KV language, you can code and build the GUI interface easily (it's just like Java XML, but rather than TextView etc., KV has its own ui.widgets for a similar translation), which is in my opinion quite easy to adopt.

Currently Buildozer and python-for-android are the most recommended tools to build and package your apps. I have tried them both and can firmly say that they make building Android apps with Python a breeze. Their guides are well documented too.

iOS is another big selling point of Kivy. You can use the same code base with few changes required via kivy-ios Homebrew tools, although Xcode is required for the build, before running on their devices (AFAIK the iOS Simulator in Xcode currently doesn't work for the x86-architecture build). There are also some dependency issues which must be manually compiled and fiddled around with in Xcode to have a successful build, but they wouldn't be too difficult to resolve and people in Kivy Google Group are really helpful too.

With all that being said, users with good Python knowledge should have no problem picking up the basics quickly.

If you are using Kivy for more serious projects, you may find existing modules unsatisfactory. There are some workable solutions though. With the (work in progress) pyjnius for Android, and pyobjus, users can now access Java/Objective-C classes to control some of the native APIs.

陈独秀 2024-07-12 20:38:57

这里是Python官方网站上列出的一些工具


有一个应用程序叫做Playstore 中的 QPython3 可用于编辑和运行 python 脚本。

Playstore 链接


另一个名为 Termux,您可以在其中使用命令

pkg install python

Playstore 链接< /a>


如果你想开发应用程序,可以使用 Python Android 脚本层(SL4A

Android 脚本层 SL4A 是一个开源应用程序,允许使用多种解释语言编写的程序在 Android 上运行。 它还提供了一个高级 API,允许这些程序与 Android 设备交互,从而轻松执行访问传感器数据、发送短信、渲染用户界面等操作。


您还可以检查 PySide for Android,它实际上是 Qt 4 的 Python 绑定。


有一个名为PyMob 其中应用程序可以纯粹用 Python 和编译器工具编写 - flow (PyMob) 将它们转换为各种平台的本机源代码。


另请检查 python-for-android

python-for-android 是一个开源构建工具,可让您将 Python 代码打包到独立的 android APK 中。 这些可以像任何其他 Android 应用程序一样传递、安装或上传到 Play 商店等市场。 该工具最初是为 Kivy 跨平台图形框架开发的,但现在支持多个引导程序,并且可以轻松扩展以打包适用于 Android 的其他类型的 Python 应用程序。


尝试 Chaquopy
适用于 Android 的 Python SDK


并且... BeeWare

BeeWare 允许您编写自己的使用Python编写应用程序并在多个平台上发布。 无需用多种编程语言重写应用程序。 这意味着构建工具、环境、兼容性等没有问题。

Here are some tools listed in official python website


There is an app called QPython3 in playstore which can be used for both editing and running python script.

Playstore link


Another app called Termux in which you can install python using command

pkg install python

Playstore Link


If you want develop apps , there is Python Android Scripting Layer (SL4A) .

The Scripting Layer for Android, SL4A, is an open source application that allows programs written in a range of interpreted languages to run on Android. It also provides a high level API that allows these programs to interact with the Android device, making it easy to do stuff like accessing sensor data, sending an SMS, rendering user interfaces and so on.


You can also check PySide for Android, which is actually Python bindings for the Qt 4.


There's a platform called PyMob where apps can be written purely in Python and the compiler tool-flow (PyMob) converts them in native source codes for various platforms.


Also check python-for-android

python-for-android is an open source build tool to let you package Python code into standalone android APKs. These can be passed around, installed, or uploaded to marketplaces such as the Play Store just like any other Android app. This tool was originally developed for the Kivy cross-platform graphical framework, but now supports multiple bootstraps and can be easily extended to package other types of Python apps for Android.


Try Chaquopy
A Python SDK for Android


Anddd... BeeWare

BeeWare allows you to write your app in Python and release it on multiple platforms. No need to rewrite the app in multiple programming languages. It means no issues with build tools, environments, compatibility, etc.

朱染 2024-07-12 20:38:57

QPython

我使用QPython 应用程序。 它是免费的,包含代码编辑器、交互式解释器和包管理器,允许您直接在设备上创建和执行 Python 程序。

QPython

I use the QPython app. It's free and includes a code editor, an interactive interpreter and a package manager, allowing you to create and execute Python programs directly on your device.

错爱 2024-07-12 20:38:57

来自 Python for android 站点:

Python for android 是一个项目,用于创建您自己的 Python 发行版(包括您想要的模块),并创建一个包含 python、库和您的应用程序的 apk。

From the Python for android site:

Python for android is a project to create your own Python distribution including the modules you want, and create an apk including python, libs, and your application.

作业与我同在 2024-07-12 20:38:57

Chaquopy

Chaquopy 是 Android Studio 基于 Gradle 的构建系统的插件。 它专注于与标准 Android 开发工具紧密集成

  • 它提供了完整的API来调用从Python调用Java来自 Java 的 Python,允许开发人员使用最适合其应用程序每个组件的语言.

  • 它可以自动下载PyPI包并将它们构建成应用程序,包括选定的本机包,例如 NumPy。

  • 它允许从 Python 完全访问所有 Android API,包括本机用户界面工具包 (纯 Python 活动示例)。

这曾经是一个商业产品,但现在是免费且开源的。

(我是这个产品的创造者。)

Chaquopy

Chaquopy is a plugin for Android Studio's Gradle-based build system. It focuses on close integration with the standard Android development tools.

  • It provides complete APIs to call Java from Python or Python from Java, allowing the developer to use whichever language is best for each component of their app.

  • It can automatically download PyPI packages and build them into an app, including selected native packages such as NumPy.

  • It enables full access to all Android APIs from Python, including the native user interface toolkit (example pure-Python activity).

This used to be a commercial product, but it's now free and open-source.

(I am the creator of this product.)

如何视而不见 2024-07-12 20:38:57

另一种尝试:https://code.google.com/p/android-python27/

这个嵌入直接使用应用程序 apk 中的 Python 解释器。

Yet another attempt: https://code.google.com/p/android-python27/

This one embed directly the Python interpretter in your app apk.

清醇 2024-07-12 20:38:57

您可以使用 sl4a 运行 Python 代码。 sl4a 支持 Python、Perl JRubyLua、BeanShell、JavaScript、Tcl 和 shell 脚本。

您可以学习 sl4a Python 示例

You can run your Python code using sl4a. sl4a supports Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell script.

You can learn sl4a Python Examples.

梦里泪两行 2024-07-12 20:38:57

看看 BeeWare。 它已经显着增长。 它获得了 PSF(Python 软件基金会)教育补助金。

Beeware 的目标是能够使用 Python 创建适用于所有支持的操作系统(包括 Android)的本机应用程序。

官方网站:Beeware

Github 存储库:https://github.com/beeware

Take a look at BeeWare. It has grown significantly. It is awarded with PSF (Python Software Foundation) Education Grant.

Beeware's aim is to be able to create native apps with Python for all supported operating systems, including Android.

Official Website: Beeware

Github Repo: https://github.com/beeware

旧梦荧光笔 2024-07-12 20:38:57

您可以使用QPython

它有一个Python控制台、编辑器以及包管理/安装程序

http:// /qpython.com/

这是一个开源项目,同时具有 Python 2 和 Python 3 实现。 您可以直接从 github 下载源代码和 Android .apk 文件。

QPython 2: https://github.com/qpython-android/qpython/releases

QPython 3: https://github.com/qpython-android/qpython3/releases

You can use QPython:

It has a Python Console, Editor, as well as Package Management / Installers

http://qpython.com/

It's an open source project with both Python 2 and Python 3 implementations. You can download the source and the Android .apk files directly from github.

QPython 2: https://github.com/qpython-android/qpython/releases

QPython 3: https://github.com/qpython-android/qpython3/releases

思念绕指尖 2024-07-12 20:38:57

查看enaml-native,它采用了react-native概念并将其应用于python。

它允许用户使用原生 Android 小部件构建应用程序,并提供 API 来使用 Python 中的 android 和 java 库。

它还与 android-studio 集成,并共享一些 React 的优秀开发功能,例如代码重新加载和远程调试。

Check out enaml-native which takes the react-native concept and applies it to python.

It lets users build apps with native Android widgets and provides APIs to use android and java libraries from python.

It also integrates with android-studio and shares a few of react's nice dev features like code reloading and remote debugging.

拥有 2024-07-12 20:38:57

如果您正在寻找 3.4.2 或更高版本(撰写本文时为 3.9.6),另一个选择是 GitHub 上的此存档。

Python3-Android 3.4.2Python3-Android 3.9.6

我相信原始存档支持Python 3.4.2,最新的GRRedwings分支支持3.9.6和22b版本NDK。 较旧的分支支持其他版本,但使用 docker 编译并不那么容易。

在旧版本中,您只需克隆存档,运行 make 即可获得 .so 或 .a 。

较新版本遵循自述文件,但它使用 docker 来实现一致的构建。

我目前使用它在 Android 设备上运行原始 Python。 通过对构建文件进行一些修改,您还可以制作 x86 和 armeabi 64 位

Another option if you are looking for 3.4.2 or newer (3.9.6 as of this writing) is this archive on GitHub.

Python3-Android 3.4.2 or Python3-Android 3.9.6

I believe the original archive supports Python 3.4.2, the latest GRRedwings branch support 3.9.6 and the 22b version of the NDK. Older branches support other versions, but are not as easy to compile with docker.

The older version you simply clone the archive, run make and you get the .so or the .a

The newer versions follow the ReadMe, but it uses docker for consistent builds.

I currently use this to run raw Python on android devices. With a couple modifications to the build files you can also make x86 and armeabi 64 bit

梦里人 2024-07-12 20:38:57

没有在这里看到这篇文章,但由于 Necessitas,Qt 可以在 Android 上运行,因此您可以使用 Pyside 和 Qt 来完成此操作。

目前看来这很麻烦,但最终可能是一条可行的路线...

http://qt- project.org/wiki/PySide_for_Android_guide

Didn't see this posted here, but you can do it with Pyside and Qt now that Qt works on Android thanks to Necessitas.

It seems like quite a kludge at the moment but could be a viable route eventually...

http://qt-project.org/wiki/PySide_for_Android_guide

柠檬色的秋千 2024-07-12 20:38:57

另一种选择似乎是 pyqtdeploy ,它引用的文档是:

该工具与 Qt 提供的其他工具结合使用,可以实现
使用 Python 编写的 PyQt4 和 PyQt5 应用程序的部署
v2.7 或 Python v3.3 或更高版本。 支持部署到桌面
平台(Linux、Windows 和 OS X)和移动平台(iOS 和
安卓)。

根据 通过 pyqtdeploy 和 Qt5 将 PyQt5 应用程序部署到 Android 尽管很难找到工作 Android 应用程序的示例或有关如何将所有必需的库交叉编译到 Android 的教程,但它正在积极开发。 不过,这是一个值得记住的有趣项目!

One more option seems to be pyqtdeploy which citing the docs is:

a tool that, in conjunction with other tools provided with Qt, enables
the deployment of PyQt4 and PyQt5 applications written with Python
v2.7 or Python v3.3 or later. It supports deployment to desktop
platforms (Linux, Windows and OS X) and to mobile platforms (iOS and
Android).

According to Deploying PyQt5 application to Android via pyqtdeploy and Qt5 it is actively developed, although it is difficult to find examples of working Android apps or tutorial on how to cross-compile all the required libraries to Android. It is an interesting project to keep in mind though!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文