{"id":1104082,"date":"2025-01-08T16:17:04","date_gmt":"2025-01-08T08:17:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1104082.html"},"modified":"2025-01-08T16:17:07","modified_gmt":"2025-01-08T08:17:07","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e7%94%a8python%e5%86%99%e7%9a%84%e4%bb%a3%e7%a0%81%e5%bc%84%e6%88%90app","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1104082.html","title":{"rendered":"\u5982\u4f55\u5c06\u7528Python\u5199\u7684\u4ee3\u7801\u5f04\u6210APP"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25065614\/e365a345-cf49-4891-ae43-e633aa428bdd.webp\" alt=\"\u5982\u4f55\u5c06\u7528Python\u5199\u7684\u4ee3\u7801\u5f04\u6210APP\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u5c06\u7528Python\u5199\u7684\u4ee3\u7801\u5f04\u6210APP<\/strong><\/p>\n<\/p>\n<p><p><strong>\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u5e94\u7528\u7a0b\u5e8f\uff0c\u901a\u5e38\u6d89\u53ca\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u6846\u67b6\u3001\u6253\u5305\u5de5\u5177\u3001\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\u7b49\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Kivy\u3001PyQt\u6216Tkinter\u6765\u521b\u5efaGUI\u5e94\u7528\uff0c\u4f7f\u7528PyInstaller\u6216cx_Freeze\u8fdb\u884c\u6253\u5305\uff0c\u6216\u8005\u9009\u62e9\u8de8\u5e73\u53f0\u6846\u67b6\u5982BeeWare\u3002<\/strong>\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Kivy\u6846\u67b6\u3001PyInstaller\u6253\u5305\u5de5\u5177\u4ee5\u53caBeeWare\u8de8\u5e73\u53f0\u6846\u67b6\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528Kivy\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>Kivy\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Python\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u5f00\u53d1\u591a\u70b9\u89e6\u63a7\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u652f\u6301\u591a\u79cd\u5e73\u53f0\uff0c\u5305\u62ecWindows\u3001macOS\u3001Linux\u3001Android\u548ciOS\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5Kivy<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Kivy\u3002\u53ef\u4ee5\u4f7f\u7528pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install kivy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u521b\u5efa\u57fa\u672c\u7684Kivy\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Kivy\u5e94\u7528\u7a0b\u5e8f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from kivy.app import App<\/p>\n<p>from kivy.uix.label import Label<\/p>\n<p>class MyApp(App):<\/p>\n<p>    def build(self):<\/p>\n<p>        return Label(text=&quot;Hello, Kivy!&quot;)<\/p>\n<p>if __name__ == &quot;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&quot;:<\/p>\n<p>    MyApp().run()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u8fd0\u884cKivy\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4fdd\u5b58\u4e0a\u9762\u7684\u4ee3\u7801\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982<code>main.py<\/code>\uff0c\u7136\u540e\u8fd0\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\uff0c\u5176\u4e2d\u663e\u793a\u201cHello, Kivy!\u201d\u7684\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><h3>4. \u6253\u5305Kivy\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u5c06Kivy\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u72ec\u7acb\u7684\u5e94\u7528\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Buildozer\uff08\u9002\u7528\u4e8eAndroid\u548ciOS\uff09\u6216PyInstaller\uff08\u9002\u7528\u4e8e\u684c\u9762\u5e73\u53f0\uff09\u3002<\/p>\n<\/p>\n<p><h4>\u4f7f\u7528Buildozer<\/h4>\n<\/p>\n<p><p>Buildozer\u662f\u4e00\u4e2a\u7528\u4e8e\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3aAndroid\u548ciOS\u5e94\u7528\u7a0b\u5e8f\u7684\u5de5\u5177\u3002\u4f60\u53ef\u4ee5\u5728Linux\u6216macOS\u4e0a\u4f7f\u7528\u5b83\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Buildozer\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install buildozer<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u521d\u59cb\u5316Buildozer\u9879\u76ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">buildozer init<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2a<code>buildozer.spec<\/code>\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u7f16\u8f91\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6784\u5efa\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">buildozer -v android debug<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528PyInstaller<\/h4>\n<\/p>\n<p><p>PyInstaller\u662f\u4e00\u79cd\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u8f6c\u6362\u4e3a\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\uff0c\u9002\u7528\u4e8eWindows\u3001macOS\u548cLinux\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5PyInstaller\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyinstaller<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6253\u5305\u4f60\u7684Kivy\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728<code>dist<\/code>\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528PyQt\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>PyQt\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684Python\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u8de8\u5e73\u53f0\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u57fa\u4e8eQt\u6846\u67b6\uff0c\u5177\u6709\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u826f\u597d\u7684\u6587\u6863\u652f\u6301\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5PyQt<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5PyQt\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install PyQt5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u521b\u5efa\u57fa\u672c\u7684PyQt\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684PyQt\u5e94\u7528\u7a0b\u5e8f\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>from PyQt5.QtWidgets import QApplication, QLabel<\/p>\n<p>app = QApplication(sys.argv)<\/p>\n<p>label = QLabel(&quot;Hello, PyQt!&quot;)<\/p>\n<p>label.show()<\/p>\n<p>sys.exit(app.exec_())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u8fd0\u884cPyQt\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4fdd\u5b58\u4e0a\u9762\u7684\u4ee3\u7801\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982<code>main.py<\/code>\uff0c\u7136\u540e\u8fd0\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\uff0c\u5176\u4e2d\u663e\u793a\u201cHello, PyQt!\u201d\u7684\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><h3>4. \u6253\u5305PyQt\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528PyInstaller\u5c06PyQt\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u72ec\u7acb\u7684\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728<code>dist<\/code>\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528Tkinter\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>Tkinter\u662fPython\u7684\u6807\u51c6GUI\u5e93\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u548c\u7b80\u5355\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>1. \u521b\u5efa\u57fa\u672c\u7684Tkinter\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Tkinter\u5e94\u7528\u7a0b\u5e8f\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>label = tk.Label(root, text=&quot;Hello, Tkinter!&quot;)<\/p>\n<p>label.pack()<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u8fd0\u884cTkinter\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4fdd\u5b58\u4e0a\u9762\u7684\u4ee3\u7801\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982<code>main.py<\/code>\uff0c\u7136\u540e\u8fd0\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\uff0c\u5176\u4e2d\u663e\u793a\u201cHello, Tkinter!\u201d\u7684\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><h3>3. \u6253\u5305Tkinter\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528PyInstaller\u5c06Tkinter\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u72ec\u7acb\u7684\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728<code>dist<\/code>\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528BeeWare\u521b\u5efa\u8de8\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>BeeWare\u662f\u4e00\u4e2a\u7528\u4e8e\u6784\u5efa\u8de8\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f\u7684Python\u6846\u67b6\uff0c\u652f\u6301\u684c\u9762\u548c\u79fb\u52a8\u5e73\u53f0\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5BeeWare<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5BeeWare\u7684Toga\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install toga<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u521b\u5efa\u57fa\u672c\u7684BeeWare\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684BeeWare\u5e94\u7528\u7a0b\u5e8f\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import toga<\/p>\n<p>from toga.style import Pack<\/p>\n<p>from toga.style.pack import COLUMN, CENTER<\/p>\n<p>class HelloWorld(toga.App):<\/p>\n<p>    def startup(self):<\/p>\n<p>        main_box = toga.Box(style=Pack(direction=COLUMN, alignment=CENTER))<\/p>\n<p>        hello_label = toga.Label(&#39;Hello, BeeWare!&#39;, style=Pack(padding=(0, 5)))<\/p>\n<p>        main_box.add(hello_label)<\/p>\n<p>        self.main_window = toga.MainWindow(title=self.formal_name)<\/p>\n<p>        self.main_window.content = main_box<\/p>\n<p>        self.main_window.show()<\/p>\n<p>def main():<\/p>\n<p>    return HelloWorld()<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    main().main_loop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u8fd0\u884cBeeWare\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4fdd\u5b58\u4e0a\u9762\u7684\u4ee3\u7801\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982<code>main.py<\/code>\uff0c\u7136\u540e\u8fd0\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\uff0c\u5176\u4e2d\u663e\u793a\u201cHello, BeeWare!\u201d\u7684\u6807\u7b7e\u3002<\/p>\n<\/p>\n<p><h3>4. \u6253\u5305BeeWare\u5e94\u7528<\/h3>\n<\/p>\n<p><p>BeeWare\u63d0\u4f9b\u4e86\u5de5\u5177\u6765\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u4e0d\u540c\u5e73\u53f0\u7684\u72ec\u7acb\u5e94\u7528\u3002\u4f60\u53ef\u4ee5\u53c2\u8003BeeWare\u7684\u6587\u6863\u6765\u4e86\u89e3\u5177\u4f53\u7684\u6253\u5305\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u5e94\u7528\u7a0b\u5e8f\u5e76\u4e0d\u662f\u4e00\u4ef6\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u4f46\u9700\u8981\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u6846\u67b6\u3002<strong>Kivy\u3001PyQt\u3001Tkinter\u548cBeeWare<\/strong>\u90fd\u662f\u5e38\u7528\u7684\u9009\u62e9\uff0c\u6bcf\u4e2a\u5de5\u5177\u90fd\u6709\u5176\u4f18\u52bf\u548c\u9002\u7528\u573a\u666f\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u5e0c\u671b\u4f60\u80fd\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\uff0c\u5e76\u6210\u529f\u5730\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u529f\u80fd\u5b8c\u5584\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u6846\u67b6\uff0c\u5982Kivy\u3001BeeWare\u548cPyQt\u3002Kivy\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u652f\u6301\u591a\u5e73\u53f0\uff0c\u5305\u62ecAndroid\u548ciOS\u3002\u60a8\u53ea\u9700\u5b89\u88c5Kivy\u5e93\uff0c\u521b\u5efa\u7528\u6237\u754c\u9762\u548c\u903b\u8f91\uff0c\u7136\u540e\u4f7f\u7528Kivy\u7684\u6253\u5305\u5de5\u5177\u5c06\u5176\u6253\u5305\u4e3a\u5e94\u7528\u7a0b\u5e8f\u3002BeeWare\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u5b83\u5141\u8bb8\u60a8\u7f16\u5199\u4e00\u6b21\u4ee3\u7801\u5e76\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\u8fd0\u884c\u3002<\/p>\n<p><strong>Python\u5e94\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u5982\u4f55\u4f18\u5316\uff1f<\/strong><br \/>\u5728\u5c06Python\u4ee3\u7801\u8f6c\u5316\u4e3a\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u6027\u80fd\u4f18\u5316\u81f3\u5173\u91cd\u8981\u3002\u786e\u4fdd\u4ee3\u7801\u9ad8\u6548\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684\u6027\u80fd\u5206\u6790\u5de5\u5177\uff08\u5982cProfile\uff09\u6765\u8bc6\u522b\u74f6\u9888\u3002\u6b64\u5916\uff0c\u5c3d\u91cf\u51cf\u5c11\u5185\u5b58\u5360\u7528\uff0c\u4f7f\u7528\u5408\u9002\u7684\u6570\u636e\u7ed3\u6784\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u5faa\u73af\u548c\u8ba1\u7b97\uff0c\u8fd9\u6837\u53ef\u4ee5\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u54cd\u5e94\u901f\u5ea6\u548c\u6d41\u7545\u5ea6\u3002<\/p>\n<p><strong>\u5728\u5c06Python\u4ee3\u7801\u6253\u5305\u4e3aAPP\u65f6\uff0c\u5982\u4f55\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff1f<\/strong><br \/>\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\u662f\u5c06Python\u4ee3\u7801\u6253\u5305\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528pip freeze\u751f\u6210requirements.txt\u6587\u4ef6\uff0c\u5217\u51fa\u6240\u6709\u4f9d\u8d56\u5e93\u3002\u5927\u591a\u6570\u6253\u5305\u5de5\u5177\u5982PyInstaller\u548cKivy\u7684buildozer\u90fd\u80fd\u81ea\u52a8\u8bc6\u522b\u5e76\u6253\u5305\u8fd9\u4e9b\u4f9d\u8d56\u9879\u3002\u786e\u4fdd\u5728\u6253\u5305\u4e4b\u524d\u6d4b\u8bd5\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u786e\u4fdd\u6240\u6709\u4f9d\u8d56\u5173\u7cfb\u90fd\u80fd\u6b63\u786e\u5b89\u88c5\u548c\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u5c06\u7528Python\u5199\u7684\u4ee3\u7801\u5f04\u6210APP \u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u5e94\u7528\u7a0b\u5e8f\uff0c\u901a\u5e38\u6d89\u53ca\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u6846\u67b6\u3001\u6253\u5305 [&hellip;]","protected":false},"author":3,"featured_media":1104092,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1104082"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1104082"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1104082\/revisions"}],"predecessor-version":[{"id":1104097,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1104082\/revisions\/1104097"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1104092"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1104082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1104082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1104082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}