{"id":944724,"date":"2024-12-26T23:11:56","date_gmt":"2024-12-26T15:11:56","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/944724.html"},"modified":"2024-12-26T23:11:58","modified_gmt":"2024-12-26T15:11:58","slug":"termux%e5%a6%82%e4%bd%95%e7%bc%96%e8%be%91python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/944724.html","title":{"rendered":"termux\u5982\u4f55\u7f16\u8f91python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081607\/3f30326d-5668-4572-8b30-b530ebc63828.webp\" alt=\"termux\u5982\u4f55\u7f16\u8f91python\" \/><\/p>\n<blockquote>\n<p><p>search(&quot;termux\u5982\u4f55\u7f16\u8f91python&quot;)<\/p>\n<\/p>\n<\/blockquote>\n<p><p><strong>\u5728Termux\u4e2d\u7f16\u8f91Python\u4ee3\u7801\u7684\u5173\u952e\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5Termux\u3001\u5b89\u88c5Python\u3001\u9009\u62e9\u5408\u9002\u7684\u7f16\u8f91\u5668\uff08\u5982Nano\u3001Vim\u3001Emacs\uff09\u3001\u7f16\u5199\u4ee3\u7801\u3001\u8fd0\u884c\u548c\u8c03\u8bd5\u4ee3\u7801\u3002<\/strong> \u5176\u4e2d\uff0c<strong>\u9009\u62e9\u9002\u5408\u7684\u7f16\u8f91\u5668<\/strong> \u5bf9\u4e8e\u63d0\u5347\u7f16\u7a0b\u6548\u7387\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p><strong>\u9009\u62e9\u9002\u5408\u7684\u7f16\u8f91\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728Termux\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u591a\u79cd\u6587\u672c\u7f16\u8f91\u5668\u6765\u7f16\u5199Python\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u51e0\u79cd\u5e38\u7528\u7684\u7f16\u8f91\u5668\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>Nano<\/strong>\uff1aNano\u662f\u4e00\u6b3e\u7b80\u5355\u6613\u7528\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u9002\u5408\u521d\u5b66\u8005\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Vim<\/strong>\uff1aVim\u529f\u80fd\u5f3a\u5927\uff0c\u4f46\u5b66\u4e60\u66f2\u7ebf\u8f83\u9661\u5ced\uff0c\u9002\u5408\u6709\u4e00\u5b9a\u7ecf\u9a8c\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Emacs<\/strong>\uff1aEmacs\u662f\u53e6\u4e00\u6b3e\u529f\u80fd\u4e30\u5bcc\u7684\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c\u63d2\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u9009\u62e9\u9002\u5408\u60a8\u7684\u7f16\u8f91\u5668\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7f16\u5199\u7684\u6548\u7387\u548c\u8212\u9002\u5ea6\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e00\u3001\u5b89\u88c5Termux<\/strong><\/p>\n<\/p>\n<p><p>Termux\u662f\u4e00\u6b3e\u8fd0\u884c\u5728Android\u8bbe\u5907\u4e0a\u7684Linux\u73af\u5883\u6a21\u62df\u5668\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b83\u5728\u624b\u673a\u4e0a\u8fd0\u884cLinux\u547d\u4ee4\u3001\u7f16\u5199\u4ee3\u7801\u7b49\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u4eceGoogle Play\u5546\u5e97\u6216F-Droid\u4e0b\u8f7d\u5e76\u5b89\u88c5Termux\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e8c\u3001\u5b89\u88c5Python<\/strong><\/p>\n<\/p>\n<p><p>\u5728Termux\u4e2d\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\u3002\u6253\u5f00Termux\u540e\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0\u8f6f\u4ef6\u5305\u5217\u8868\u5e76\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg update<\/p>\n<p>pkg install python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165<code>python<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u770b\u5230Python\u7684\u63d0\u793a\u7b26\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e09\u3001\u9009\u62e9\u7f16\u8f91\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u524d\u6240\u8ff0\uff0cTermux\u4e2d\u6709\u591a\u79cd\u7f16\u8f91\u5668\u53ef\u4f9b\u9009\u62e9\u3002\u4ee5\u4e0b\u662f\u5b89\u88c5\u548c\u4f7f\u7528\u8fd9\u4e9b\u7f16\u8f91\u5668\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><p><strong>1. Nano<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5Nano\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install nano<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528Nano\u7f16\u8f91Python\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">nano my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Nano\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u7f16\u5199\u4ee3\u7801\u3002\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u6309<code>Ctrl + X<\/code>\u9000\u51fa\uff0c\u6309<code>Y<\/code>\u4fdd\u5b58\u66f4\u6539\u3002<\/p>\n<\/p>\n<p><p><strong>2. Vim<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5Vim\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install vim<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528Vim\u7f16\u8f91Python\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">vim my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Vim\u4e2d\uff0c\u6309<code>i<\/code>\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u5f00\u59cb\u7f16\u8f91\u3002\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u6309<code>Esc<\/code>\u9000\u51fa\u63d2\u5165\u6a21\u5f0f\uff0c\u8f93\u5165<code>:wq<\/code>\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><p><strong>3. Emacs<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5Emacs\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install emacs<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528Emacs\u7f16\u8f91Python\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">emacs my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Emacs\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u7f16\u8f91\u4ee3\u7801\u3002\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u6309<code>Ctrl + X<\/code>\uff0c\u7136\u540e\u6309<code>Ctrl + S<\/code>\u4fdd\u5b58\u6587\u4ef6\uff0c\u6309<code>Ctrl + X<\/code>\uff0c\u518d\u6309<code>Ctrl + C<\/code>\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<\/p>\n<p><p><strong>\u56db\u3001\u7f16\u5199\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u9009\u62e9\u7f16\u8f91\u5668\u540e\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199Python\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, Termux!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06\u4e0a\u8ff0\u4ee3\u7801\u4fdd\u5b58\u4e3a<code>my_script.py<\/code>\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e94\u3001\u8fd0\u884c\u548c\u8c03\u8bd5\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728Termux\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884cPython\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4ee3\u7801\u4e2d\u6709\u9519\u8bef\uff0cPython\u89e3\u91ca\u5668\u4f1a\u663e\u793a\u9519\u8bef\u4fe1\u606f\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u63d0\u793a\u8fdb\u884c\u8c03\u8bd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u516d\u3001\u5b89\u88c5\u548c\u4f7f\u7528\u9ad8\u7ea7\u7f16\u8f91\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u9664\u4e86Nano\u548cVim\uff0cTermux\u8fd8\u652f\u6301\u5b89\u88c5\u548c\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u7f16\u8f91\u5668\uff0c\u5982Emacs\u548cNeovim\u3002<\/p>\n<\/p>\n<p><p><strong>1. \u5b89\u88c5Emacs<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install emacs<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Emacs\u662f\u4e00\u6b3e\u529f\u80fd\u975e\u5e38\u5f3a\u5927\u7684\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c\u63d2\u4ef6\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Emacs\u7f16\u8f91Python\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">emacs my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Emacs\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl + X Ctrl + S<\/code>\u4fdd\u5b58\u6587\u4ef6\uff0c<code>Ctrl + X Ctrl + C<\/code>\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<\/p>\n<p><p><strong>2. \u5b89\u88c5Neovim<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install neovim<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Neovim\u662fVim\u7684\u589e\u5f3a\u7248\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u73b0\u4ee3\u5316\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Neovim\u7f16\u8f91Python\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">nvim my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Neovim\u4e2d\uff0c\u57fa\u672c\u64cd\u4f5c\u4e0eVim\u7c7b\u4f3c\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b66\u4e60Neovim\u7684\u6587\u6863\u548c\u6559\u7a0b\u6765\u638c\u63e1\u66f4\u591a\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e03\u3001\u4f7f\u7528\u7248\u672c\u63a7\u5236<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982Git\uff09\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7ba1\u7406\u4ee3\u7801\u7248\u672c\u548c\u534f\u4f5c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><p><strong>\u5b89\u88c5Git<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pkg install git<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u521d\u59cb\u5316Git\u4ed3\u5e93<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git init<\/p>\n<p>git add my_script.py<\/p>\n<p>git commit -m &quot;Initial commit&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6dfb\u52a0\u5230Git\u4ed3\u5e93\u4e2d\uff0c\u5e76\u8fdb\u884c\u7248\u672c\u7ba1\u7406\u3002<\/p>\n<\/p>\n<p><p><strong>\u516b\u3001\u4f7f\u7528Python\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>Python\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5305\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u5305\u51b2\u7a81\u3002<\/p>\n<\/p>\n<p><p><strong>\u5b89\u88c5virtualenv<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install virtualenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u521b\u5efa\u548c\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">virtualenv myenv<\/p>\n<p>source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\uff0c\u5e76\u786e\u4fdd\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u9694\u79bb\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e5d\u3001\u4f7f\u7528<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/23316.html\" target=\"_blank\">\u9879\u76ee\u7ba1\u7406<\/a>\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u56e2\u961f\u5f00\u53d1\u4e2d\uff0c\u4f7f\u7528\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\u53ef\u4ee5\u63d0\u9ad8\u534f\u4f5c\u6548\u7387\u548c\u9879\u76ee\u8fdb\u5ea6\u7ba1\u7406\u3002\u63a8\u8350\u4f7f\u7528\u7814\u53d1\u9879\u76ee\u7ba1\u7406\u7cfb\u7edfPingCode\u548c\u901a\u7528\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6Worktile\u3002<\/p>\n<\/p>\n<p><p><strong>1. \u7814\u53d1\u9879\u76ee\u7ba1\u7406\u7cfb\u7edfPingCode<\/strong><\/p>\n<\/p>\n<p><p>PingCode\u662f\u4e00\u6b3e\u4e13\u4e3a\u7814\u53d1\u56e2\u961f\u8bbe\u8ba1\u7684\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\uff0c\u63d0\u4f9b\u4e86\u4efb\u52a1\u7ba1\u7406\u3001\u4ee3\u7801\u7ba1\u7406\u3001\u6d4b\u8bd5\u7ba1\u7406\u7b49\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p><strong>PingCode\u7684\u4e3b\u8981\u529f\u80fd<\/strong><\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u4efb\u52a1\u7ba1\u7406<\/strong>\uff1a\u901a\u8fc7\u770b\u677f\u548c\u7518\u7279\u56fe\u7ba1\u7406\u4efb\u52a1\u8fdb\u5ea6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u7ba1\u7406<\/strong>\uff1a\u4e0eGit\u96c6\u6210\uff0c\u65b9\u4fbf\u4ee3\u7801\u7248\u672c\u7ba1\u7406\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6d4b\u8bd5\u7ba1\u7406<\/strong>\uff1a\u652f\u6301\u81ea\u52a8\u5316\u6d4b\u8bd5\u548c\u624b\u52a8\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p><strong>2. \u901a\u7528\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6Worktile<\/strong><\/p>\n<\/p>\n<p><p>Worktile\u662f\u4e00\u6b3e\u901a\u7528\u9879\u76ee\u7ba1\u7406\u8f6f\u4ef6\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u7c7b\u578b\u7684\u9879\u76ee\u7ba1\u7406\u3002<\/p>\n<\/p>\n<p><p><strong>Worktile\u7684\u4e3b\u8981\u529f\u80fd<\/strong><\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u4efb\u52a1\u5206\u914d<\/strong>\uff1a\u901a\u8fc7\u4efb\u52a1\u770b\u677f\u5206\u914d\u548c\u8ddf\u8e2a\u4efb\u52a1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6587\u4ef6\u7ba1\u7406<\/strong>\uff1a\u96c6\u6210\u6587\u4ef6\u5b58\u50a8\u548c\u5171\u4eab\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u56e2\u961f\u534f\u4f5c<\/strong>\uff1a\u63d0\u4f9b\u5373\u65f6\u901a\u8baf\u548c\u8ba8\u8bba\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p><strong>\u5341\u3001\u603b\u7ed3<\/strong><\/p>\n<\/p>\n<p><p>\u5728Termux\u4e2d\u7f16\u8f91Python\u4ee3\u7801\u9700\u8981\u7ecf\u8fc7\u5b89\u88c5Termux\u3001\u5b89\u88c5Python\u3001\u9009\u62e9\u7f16\u8f91\u5668\u3001\u7f16\u5199\u4ee3\u7801\u3001 <\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Termux\u4e2d\u5982\u4f55\u5b89\u88c5Python\u7f16\u8f91\u5668\uff1f<\/strong><br \/>\u5728Termux\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u5404\u79cd\u6587\u672c\u7f16\u8f91\u5668\u6765\u7f16\u8f91Python\u4ee3\u7801\u3002\u5e38\u7528\u7684\u7f16\u8f91\u5668\u5305\u62ec Vim\u3001Nano \u548c Emacs\u3002\u8981\u5b89\u88c5\u8fd9\u4e9b\u7f16\u8f91\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a  <\/p>\n<ul>\n<li>\u5b89\u88c5 Vim\uff1a<code>pkg install vim<\/code>  <\/li>\n<li>\u5b89\u88c5 Nano\uff1a<code>pkg install nano<\/code>  <\/li>\n<li>\u5b89\u88c5 Emacs\uff1a<code>pkg install emacs<\/code><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u7f16\u8f91\u5668\u6253\u5f00\u6216\u521b\u5efaPython\u6587\u4ef6\uff0c\u4f8b\u5982\uff1a<code>vim myscript.py<\/code>\u3002<\/li>\n<\/ul>\n<p><strong>Termux\u4e2d\u7f16\u8f91Python\u6587\u4ef6\u7684\u5feb\u6377\u65b9\u5f0f\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5728Termux\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u7684\u5feb\u6377\u65b9\u5f0f\u6765\u63d0\u9ad8\u6548\u7387\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>nano myscript.py<\/code>\u5feb\u901f\u6253\u5f00\u6216\u521b\u5efa\u6587\u4ef6\uff0c\u6309<code>Ctrl + O<\/code>\u4fdd\u5b58\u6587\u4ef6\uff0c\u6309<code>Ctrl + X<\/code>\u9000\u51fa\u7f16\u8f91\u5668\u3002\u5bf9\u4e8eVim\uff0c\u6309<code>i<\/code>\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u7f16\u8f91\uff0c\u5b8c\u6210\u540e\u6309<code>Esc<\/code>\uff0c\u8f93\u5165<code>:wq<\/code>\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Termux\u4e2d\u8fd0\u884c\u7f16\u8f91\u7684Python\u811a\u672c\uff1f<\/strong><br \/>\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884cPython\u811a\u672c\u3002\u786e\u4fdd\u60a8\u7684Python\u5df2\u7ecf\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4<code>pkg install python<\/code>\u8fdb\u884c\u5b89\u88c5\u3002\u8fd0\u884c\u811a\u672c\u7684\u547d\u4ee4\u662f<code>python myscript.py<\/code>\uff0c\u5176\u4e2d<code>myscript.py<\/code>\u662f\u60a8\u521b\u5efa\u6216\u7f16\u8f91\u7684Python\u6587\u4ef6\u540d\u3002\u786e\u4fdd\u5728\u8fd0\u884c\u4e4b\u524d\uff0c\u60a8\u5df2\u5728Termux\u4e2d\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"search(&quot;termux\u5982\u4f55\u7f16\u8f91python&quot;) \u5728Termux\u4e2d\u7f16\u8f91Python\u4ee3\u7801 [&hellip;]","protected":false},"author":3,"featured_media":944731,"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\/944724"}],"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=944724"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944724\/revisions"}],"predecessor-version":[{"id":944732,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944724\/revisions\/944732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/944731"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=944724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=944724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=944724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}