{"id":177715,"date":"2024-05-08T19:36:20","date_gmt":"2024-05-08T11:36:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/177715.html"},"modified":"2024-05-08T19:36:30","modified_gmt":"2024-05-08T11:36:30","slug":"%e8%83%bd%e8%ae%a9python%e7%a8%8b%e5%ba%8f%e5%9c%a8%e5%ae%89%e5%8d%93%e6%89%8b%e6%9c%ba%e4%b8%8a%e8%bf%90%e8%a1%8c%e7%9a%84%e8%bd%af%e4%bb%b6%e9%83%bd%e6%9c%89%e5%93%aa%e4%ba%9b","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/177715.html","title":{"rendered":"\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\u90fd\u6709\u54ea\u4e9b"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27061825\/6f275f38-ca55-4361-8665-58231311ab4c.webp\" alt=\"\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\u90fd\u6709\u54ea\u4e9b\" \/><\/p>\n<p><p><strong>\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\u5305\u62ec<\/strong>\uff1a<strong>Pydroid 3\u3001QPython\u3001Termux\u3001Kivy\u3001BeeWare\u3001SL4A\uff08Scripting Layer for Android\uff09<\/strong>\u3002\u8fd9\u4e9b\u5de5\u5177\u548c\u6846\u67b6\u5404\u6709\u7279\u8272\uff0c\u9002\u5408\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u548c\u5f00\u53d1\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<strong>Kivy<\/strong>\u5c24\u5176\u503c\u5f97\u5173\u6ce8\uff0c\u5b83\u4e0d\u4ec5\u652f\u6301Android\uff0c\u8fd8\u9002\u7528\u4e8e\u5176\u4ed6\u5e73\u53f0\uff0c\u5982Windows\u3001MacOS\u3001Linux\u4e43\u81f3iOS\u3002<strong>Kivy<\/strong>\u662f\u4e00\u4e2a\u5f00\u6e90Python\u5e93\uff0c\u7528\u4e8e\u5f00\u53d1\u591a\u89e6\u6478\u5e94\u7528\u7a0b\u5e8f\uff0c\u5b83\u63d0\u4f9b\u4e86\u81ea\u7136\u7684\u7528\u6237\u754c\u9762\uff0c\u4f8b\u5982\uff1a\u591a\u70b9\u89e6\u63a7\u3001\u624b\u52bf\u7b49\u3002Kivy\u5f3a\u5927\u7684\u529f\u80fd\u548c\u8de8\u5e73\u53f0\u7684\u7279\u6027\u4f7f\u5176\u5728\u5f00\u53d1\u79fb\u52a8\u5e94\u7528\u65f6\u7279\u522b\u6709\u4ef7\u503c\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u7f16\u5199\u4e00\u6b21\u4ee3\u7801\uff0c\u8fd0\u884c\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\uff0c\u6781\u5927\u5730\u8282\u7701\u4e86\u5f00\u53d1\u65f6\u95f4\u548c\u6210\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001PYDROID 3<\/h3>\n<\/p>\n<p><p>Pydroid 3\u662f\u4e00\u4e2a\u9488\u5bf9\u5b89\u5353\u7528\u6237\u7684\u9ad8\u7ea7Python 2\u548cPython 3 IDE\uff0c\u975e\u5e38\u9002\u5408\u5b66\u4e60\u3001\u5f00\u53d1\u3001\u8fd0\u884cPython\u9879\u76ee\u3002\u800c\u4e14\uff0c\u5b83\u914d\u5907\u4e86\u4e00\u5957\u5e7f\u6cdb\u7684\u5de5\u5177\u5e93\u53ca\u4e00\u4e2a\u5408\u9002\u7684\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0cPydroid 3\u754c\u9762\u53cb\u597d\uff0c\u4e14\u6613\u4e8e\u4f7f\u7528\uff0c\u652f\u6301\u5b89\u88c5\u989d\u5916\u7684Python\u5e93\uff0c\u975e\u5e38\u9002\u5408Python\u5b66\u4e60\u8005\u548c\u5f00\u53d1\u8005\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5b83\u63d0\u4f9b\u4e86\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u5e26\u6709\u4ee3\u7801\u5b8c\u6210\u3001\u9519\u8bef\u68c0\u6d4b\u7b49\u529f\u80fd\uff0c\u4f7f\u5f97\u7f16\u7801\u6548\u7387\u548c\u4f53\u9a8c\u5f97\u5230\u4e86\u6781\u5927\u63d0\u5347\u3002<\/li>\n<\/ul>\n<p><h3>\u4e8c\u3001QPYTHON<\/h3>\n<\/p>\n<p><p>QPython\u662f\u4e00\u6b3e\u8fd0\u884c\u5728Android\u4e0a\u7684Python\u5f15\u64ce\uff0c\u5b83\u80fd\u8ba9\u4f60\u5728Android\u8bbe\u5907\u4e0a\u8fd0\u884cPython\u811a\u672c\u3001\u9879\u76ee\u6216\u8005\u4ea4\u4e92\u5f0f\u7f16\u7a0b\u3002\u8fd9\u6b3e\u5e94\u7528\u652f\u6301Python 2.x\u548cPython 3.x\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0cQPython\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4e30\u5bcc\u7684Python\u5e93\uff0c\u4fbf\u4e8e\u8fdb\u884c\u5404\u79cd\u5b9e\u9a8c\u548c\u5f00\u53d1\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5b83\u62e5\u6709SL4A\u5e93\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u8f7b\u677e\u8bbf\u95eeAndroid API\u548c\u4f7f\u7528Python\u4ee3\u7801\u63a7\u5236Android\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p><h3>\u4e09\u3001TERMUX<\/h3>\n<\/p>\n<p><p>Termux\u662f\u4e00\u6b3e\u5f00\u6e90\u7684Android\u7ec8\u7aef\u5e94\u7528\uff0c\u5185\u7f6e\u4e86\u4e00\u4e2aLinux\u73af\u5883\uff0c\u80fd\u591f\u901a\u8fc7pkg\u7ba1\u7406\u5de5\u5177\u5b89\u88c5\u5f88\u591a\u5305\u62ecPython\u5728\u5185\u7684\u8f6f\u4ef6\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0c\u4f7f\u7528Termux\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u5b89\u5353\u8bbe\u5907\u4e0a\u50cf\u4f7f\u7528Linux\u4e00\u6837\u8fd0\u884cPython\u811a\u672c\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5b83\u652f\u6301Git\u548cSSH\uff0c\u8fd9\u5bf9\u4e8e\u9700\u8981\u8fdb\u884c\u8fdc\u7a0b\u64cd\u4f5c\u7684\u5f00\u53d1\u8005\u6765\u8bf4\u975e\u5e38\u65b9\u4fbf\u3002<\/li>\n<\/ul>\n<p><h3>\u56db\u3001KIVY<\/h3>\n<\/p>\n<p><p>Kivy\u662f\u4e00\u6b3e\u5f00\u6e90Python\u5e93\uff0c\u7528\u4e8e\u5f00\u53d1\u591a\u89e6\u6478\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u65e8\u5728\u5feb\u901f\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\u4ea4\u4e92\u754c\u9762\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0cKivy\u9002\u7528\u4e8eAndroid\u3001iOS\u3001Linux\u3001OS X\u548cWindows\uff0c\u662f\u771f\u6b63\u7684\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u5efa\u7acb\u81ea\u5b9a\u4e49\u7684UI\u63a7\u4ef6\uff0c\u5bf9\u4e8e\u5f00\u53d1\u590d\u6742\u7684\u7528\u6237\u754c\u9762\u548c\u56fe\u5f62\u5e94\u7528\u5c24\u5176\u6709\u7528\u3002<\/li>\n<\/ul>\n<p><h3>\u4e94\u3001BEEWARE<\/h3>\n<\/p>\n<p><p>BeeWare\u662f\u4e00\u5957Python\u5de5\u5177\u96c6\u5408\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u7528Python\u7f16\u5199\u5e76\u672c\u5730\u8fd0\u884c\u4ee3\u7801\u5728iOS, Android, Windows, MacOS, Linux, Web, \u4ee5\u53catvOS\u548cwatchOS\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0cBeeWare\u901a\u8fc7\u63d0\u4f9b\u4e00\u4e2aPython\u5e93Toga\uff0c\u7528Python\u4f5c\u4e3a\u539f\u751f\u7cfb\u7edf\u5e73\u53f0\u7f16\u7a0b\u8bed\u8a00\uff0c\u4f7f\u7528\u539f\u751f\u7cfb\u7edf\u63a7\u4ef6\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u8fbe\u5230\u63a5\u8fd1\u672c\u5730\u5e94\u7528\u7684\u6027\u80fd\uff0c\u8fd8\u53ef\u4ee5\u83b7\u5f97\u7edf\u4e00\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5b83\u652f\u6301\u6784\u5efa\u5e94\u7528\u5e76\u628a\u5b83\u4eec\u6253\u5305\u6210\u5b89\u5353\u6216\u5176\u4ed6\u5e73\u53f0\u7684\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u5305\u3002<\/li>\n<\/ul>\n<p><h3>\u516d\u3001SL4A\uff08SCRIPTING LAYER FOR ANDROID\uff09<\/h3>\n<\/p>\n<p><p>SL4A\u8d77\u521d\u662f\u4e3a\u4e86\u63d0\u4f9b\u4e00\u79cd\u65b9\u6cd5\u4f7f\u5f97Android\u5e94\u7528\u5f00\u53d1\u4e2d\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u811a\u672c\u8bed\u8a00\uff0c\u800cPython\u53ea\u662fSL4A\u652f\u6301\u4e2d\u7684\u4e00\u79cd\u3002<\/p>\n<\/p>\n<ul>\n<li>\u7b2c\u4e00\u70b9\uff0cSL4A\u63d0\u4f9b\u4e86\u4e00\u4e2aAPI\u6865\uff0c\u8ba9Python\u811a\u672c\u53ef\u4ee5\u8bbf\u95eeAndroid API\uff0c\u8fdb\u884c\u77ed\u4fe1\u3001\u7535\u8bdd\u3001\u7f51\u7edc\u7b49\u64cd\u4f5c\u3002<\/li>\n<li>\u7b2c\u4e8c\u70b9\uff0c\u5c3d\u7ba1SL4A\u4e0d\u518d\u50cf\u521d\u671f\u90a3\u6837\u6d3b\u8dc3\uff0c\u4f46\u5bf9\u4e8e\u5e0c\u671b\u4f7f\u7528Python\u8fdb\u884c\u7b80\u5355\u7684Android\u4efb\u52a1\u81ea\u52a8\u5316\u7684\u7528\u6237\u6765\u8bf4\uff0c\u4ecd\u7136\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/li>\n<\/ul>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u4ec0\u4e48\u662f\u80fd\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u8f6f\u4ef6\uff1f<\/strong><\/p>\n<p>\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u8f6f\u4ef6\u901a\u5e38\u88ab\u79f0\u4e3aPython\u5f00\u53d1\u5de5\u5177\u6216\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002\u8fd9\u4e9b\u5de5\u5177\u4f7f\u60a8\u80fd\u591f\u7f16\u5199\u3001\u7f16\u8f91\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u5e76\u5728\u5b89\u5353\u8bbe\u5907\u4e0a\u5b9e\u65f6\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<p><strong>2. \u6709\u54ea\u4e9b\u5e38\u7528\u7684\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\uff1f<\/strong><\/p>\n<p>\u76ee\u524d\u5e02\u9762\u4e0a\u6709\u8bb8\u591a\u652f\u6301\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u8f6f\u4ef6\uff0c\u5176\u4e2d\u6700\u53d7\u6b22\u8fce\u7684\u5305\u62ecPydroid 3\u3001QPython\u3001Termux\u7b49\u3002\u8fd9\u4e9b\u8f6f\u4ef6\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u4e8e\u5728\u7535\u8111\u4e0a\u8fd0\u884cPython\u7684\u73af\u5883\u548c\u529f\u80fd\uff0c\u5305\u62ec\u4ee3\u7801\u7f16\u8f91\u5668\u3001\u8c03\u8bd5\u5668\u548c\u7ec8\u7aef\u7a97\u53e3\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u9009\u62e9\u9002\u5408\u7684\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\uff1f<\/strong><\/p>\n<p>\u9009\u62e9\u9002\u5408\u7684Python\u5f00\u53d1\u5de5\u5177\u5e94\u8be5\u6839\u636e\u60a8\u7684\u9700\u6c42\u548c\u6280\u672f\u6c34\u5e73\u6765\u51b3\u5b9a\u3002\u5982\u679c\u60a8\u662f\u4e00\u4e2a\u65b0\u624b\u6216\u8005\u53ea\u662f\u60f3\u5728\u624b\u673a\u4e0a\u8fd0\u884c\u4e00\u4e9b\u7b80\u5355\u7684Python\u811a\u672c\uff0c\u90a3\u4e48Pydroid 3\u53ef\u80fd\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5b83\u63d0\u4f9b\u4e86\u6613\u4e8e\u4f7f\u7528\u7684\u754c\u9762\u548c\u4e00\u4e9b\u57fa\u672c\u7684\u5f00\u53d1\u5de5\u5177\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u8fdb\u884c\u66f4\u590d\u6742\u548c\u6df1\u5165\u7684Python\u5f00\u53d1\uff0c\u90a3\u4e48QPython\u53ef\u80fd\u66f4\u9002\u5408\u60a8\u3002\u5b83\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u5305\u62ec\u652f\u6301\u5916\u90e8\u5e93\u548c\u6a21\u5757\u7684\u5b89\u88c5\uff0c\u5e76\u4e14\u66f4\u9002\u5408\u9ad8\u7ea7\u5f00\u53d1\u4eba\u5458\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5982\u679c\u60a8\u66f4\u503e\u5411\u4e8e\u4f7f\u7528Linux\u7ec8\u7aef\u73af\u5883\uff0c\u90a3\u4e48Termux\u53ef\u80fd\u662f\u60a8\u7684\u9009\u62e9\u3002\u5b83\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u7ec8\u7aef\u6a21\u62df\u5668\uff0c\u5141\u8bb8\u60a8\u5728\u5b89\u5353\u8bbe\u5907\u4e0a\u8fd0\u884c\u5404\u79cd\u547d\u4ee4\u548c\u811a\u672c\uff0c\u5305\u62ecPython\u3002\u8fd9\u5bf9\u4e8e\u90a3\u4e9b\u559c\u6b22\u5728\u547d\u4ee4\u884c\u4e2d\u5de5\u4f5c\u7684\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u9879\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u80fd\u8ba9Python\u7a0b\u5e8f\u5728\u5b89\u5353\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u8f6f\u4ef6\u5305\u62ec\uff1aPydroid 3\u3001QPython\u3001Termux\u3001Kivy\u3001B [&hellip;]","protected":false},"author":3,"featured_media":177728,"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\/177715"}],"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=177715"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/177715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/177728"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=177715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=177715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=177715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}