{"id":940699,"date":"2024-12-26T21:07:42","date_gmt":"2024-12-26T13:07:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/940699.html"},"modified":"2024-12-26T21:07:44","modified_gmt":"2024-12-26T13:07:44","slug":"ubuntu%e5%a6%82%e4%bd%95%e7%bc%96%e8%be%91python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/940699.html","title":{"rendered":"Ubuntu\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\/25075228\/6ccfe7ac-08f6-4483-8d06-218e32caf47c.webp\" alt=\"Ubuntu\u5982\u4f55\u7f16\u8f91Python\" \/><\/p>\n<p><p> <strong>\u5728Ubuntu\u4e0a\u7f16\u8f91Python\u4ee3\u7801\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u548c\u547d\u4ee4\u884c\u5de5\u5177\u3002\u63a8\u8350\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u5982Vim\u3001Nano\u3001Gedit\uff0c\u4f7f\u7528IDE\u5982PyCharm\u3001Visual Studio Code\uff0c\u6216\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u5982Python\u89e3\u91ca\u5668\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528IDE\u5982PyCharm\u662f\u4e00\u4e2a\u975e\u5e38\u9ad8\u6548\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u4e13\u4e1a\u5f00\u53d1\u529f\u80fd\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6587\u672c\u7f16\u8f91\u5668\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>\u6587\u672c\u7f16\u8f91\u5668\u662f\u6700\u7b80\u5355\u7684Python\u4ee3\u7801\u7f16\u8f91\u65b9\u5f0f\u3002Ubuntu\u9884\u88c5\u4e86\u591a\u79cd\u6587\u672c\u7f16\u8f91\u5668\uff0c\u4ee5\u4e0b\u662f\u51e0\u79cd\u5e38\u7528\u7684\u7f16\u8f91\u5668\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Vim<\/strong><\/li>\n<\/ol>\n<p><p>Vim\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u9002\u5408\u6709\u4e00\u5b9a\u7f16\u7a0b\u7ecf\u9a8c\u7684\u7528\u6237\u3002\u8981\u5728Ubuntu\u4e0a\u4f7f\u7528Vim\u7f16\u8f91Python\u4ee3\u7801\uff0c\u9996\u5148\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5Vim\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p>sudo apt install vim<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6253\u5f00\u4e00\u4e2aPython\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">vim example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Vim\u4e2d\uff0c\u6309<code>i<\/code>\u952e\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u8fdb\u884c\u7f16\u8f91\uff0c\u5b8c\u6210\u540e\u6309<code>Esc<\/code>\u952e\u9000\u51fa\u63d2\u5165\u6a21\u5f0f\uff0c\u5e76\u8f93\u5165<code>:wq<\/code>\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>Nano<\/strong><\/li>\n<\/ol>\n<p><p>Nano\u662f\u4e00\u4e2a\u7b80\u5355\u6613\u7528\u7684\u7ec8\u7aef\u6587\u672c\u7f16\u8f91\u5668\uff0c\u9002\u5408\u521d\u5b66\u8005\u3002\u8981\u4f7f\u7528Nano\u7f16\u8f91Python\u4ee3\u7801\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">nano example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Nano\u4e2d\uff0c\u76f4\u63a5\u7f16\u8f91\u6587\u4ef6\u5185\u5bb9\uff0c\u5b8c\u6210\u540e\u6309<code>Ctrl + O<\/code>\u4fdd\u5b58\uff0c\u7136\u540e\u6309<code>Ctrl + X<\/code>\u9000\u51fa\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>Gedit<\/strong><\/li>\n<\/ol>\n<p><p>Gedit\u662fGNOME\u684c\u9762\u73af\u5883\u4e0b\u7684\u9ed8\u8ba4\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5177\u6709\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002\u8981\u4f7f\u7528Gedit\u7f16\u8f91Python\u4ee3\u7801\uff0c\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">gedit example.py &amp;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Gedit\u63d0\u4f9b\u4e86\u8bed\u6cd5\u9ad8\u4eae\u548c\u7b80\u6d01\u7684\u754c\u9762\uff0c\u9002\u5408\u65e5\u5e38\u7f16\u7a0b\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>IDE\u63d0\u4f9b\u4e86\u66f4\u4e3a\u5168\u9762\u7684\u5f00\u53d1\u73af\u5883\uff0c\u901a\u5e38\u5305\u62ec\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u3001\u7248\u672c\u63a7\u5236\u7b49\u529f\u80fd\u3002\u4ee5\u4e0b\u662fUbuntu\u4e0a\u5e38\u7528\u7684Python IDE\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>PyCharm<\/strong><\/li>\n<\/ol>\n<p><p>PyCharm\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684Python IDE\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u652f\u6301\u3002\u53ef\u4ee5\u4ece<a href=\"https:\/\/www.jetbrains.com\/pycharm\/\">JetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u5b98\u7f51<\/a>\u4e0b\u8f7d\u5e76\u5b89\u88c5PyCharm\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u540e\uff0c\u901a\u8fc7\u56fe\u5f62\u754c\u9762\u521b\u5efa\u6216\u6253\u5f00Python\u9879\u76ee\u3002PyCharm\u652f\u6301\u63d2\u4ef6\u6269\u5c55\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u5b89\u88c5\u4e0d\u540c\u7684\u63d2\u4ef6\u4ee5\u589e\u5f3a\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>Visual Studio Code<\/strong><\/li>\n<\/ol>\n<p><p>Visual Studio Code\uff08VSCode\uff09\u662f\u4e00\u6b3e\u6d41\u884c\u7684\u5f00\u6e90\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u5b89\u88c5VSCode\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Python\u6269\u5c55\u6765\u652f\u6301Python\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5VSCode\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo snap install --classic code<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5Python\u6269\u5c55\u540e\uff0cVSCode\u63d0\u4f9b\u4e86\u4f18\u79c0\u7684\u4ee3\u7801\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\uff0c\u662f\u5f00\u53d1Python\u7684\u7406\u60f3\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u547d\u4ee4\u884c\u5de5\u5177\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>Ubuntu\u4e2d\u8fd8\u53ef\u4ee5\u4f7f\u7528Python\u89e3\u91ca\u5668\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u4e2d\u6d4b\u8bd5\u548c\u8fd0\u884c\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u89e3\u91ca\u5668\u7684\u57fa\u672c\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Python\u89e3\u91ca\u5668<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u76f4\u63a5\u8f93\u5165<code>python3<\/code>\u8fdb\u5165Python\u89e3\u91ca\u5668\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u89e3\u91ca\u5668\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u548c\u8c03\u8bd5\u3002\u8981\u9000\u51fa\u89e3\u91ca\u5668\uff0c\u53ef\u4ee5\u8f93\u5165<code>exit()<\/code>\u6216\u6309<code>Ctrl + D<\/code>\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u8fd0\u884cPython\u811a\u672c<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884cPython\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u65b9\u6cd5\u9002\u7528\u4e8e\u5feb\u901f\u6d4b\u8bd5\u548c\u8fd0\u884cPython\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u7248\u672c\u7ba1\u7406\u548c\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728Ubuntu\u4e0a\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u901a\u5e38\u9700\u8981\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u7684Python\u548c\u4f9d\u8d56\u5e93\u3002\u865a\u62df\u73af\u5883\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u5de5\u5177\uff0c\u4ee5\u4e0b\u662f\u76f8\u5173\u7684\u4f7f\u7528\u4ecb\u7ecd\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5\u548c\u4f7f\u7528Virtualenv<\/strong><\/li>\n<\/ol>\n<p><p>Virtualenv\u662f\u4e00\u4e2a\u521b\u5efa\u72ec\u7acbPython\u73af\u5883\u7684\u5de5\u5177\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Virtualenv\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt install python3-venv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u6240\u9700\u4f9d\u8d56\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install &lt;package-name&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528<code>deactivate<\/code>\u547d\u4ee4\u9000\u51fa\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7ba1\u7406\u4e0d\u540cPython\u7248\u672c<\/strong><\/li>\n<\/ol>\n<p><p>Ubuntu\u901a\u5e38\u81ea\u5e26Python\u7684\u591a\u4e2a\u7248\u672c\u3002\u53ef\u4ee5\u4f7f\u7528<code>update-alternatives<\/code>\u547d\u4ee4\u7ba1\u7406\u4e0d\u540c\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo update-alternatives --config python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u9009\u62e9\u6240\u9700\u7684Python\u7248\u672c\u4ee5\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u8c03\u8bd5\u548c\u6d4b\u8bd5\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u8c03\u8bd5\u548c\u6d4b\u8bd5\u662f\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u91cd\u8981\u7684\u73af\u8282\u3002Ubuntu\u4e0a\u6709\u591a\u79cd\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u9ad8\u6548\u5730\u8fdb\u884c\u8c03\u8bd5\u548c\u6d4b\u8bd5\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528PDB\u8fdb\u884c\u8c03\u8bd5<\/strong><\/li>\n<\/ol>\n<p><p>PDB\u662fPython\u81ea\u5e26\u7684\u8c03\u8bd5\u5668\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u4ee3\u7801\u4e2d\u63d2\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8\u8c03\u8bd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdb; pdb.set_trace()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884c\u811a\u672c\u65f6\uff0c\u7a0b\u5e8f\u5c06\u5728<code>set_trace()<\/code>\u5904\u6682\u505c\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u68c0\u67e5\u53d8\u91cf\u548c\u6267\u884c\u72b6\u6001\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528Unittest\u8fdb\u884c\u6d4b\u8bd5<\/strong><\/li>\n<\/ol>\n<p><p>Unittest\u662fPython\u5185\u7f6e\u7684\u6d4b\u8bd5\u6846\u67b6\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c\u6d4b\u8bd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m unittest discover<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Unittest\u652f\u6301\u81ea\u52a8\u5316\u6d4b\u8bd5\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u4ee3\u7801\u66f4\u6539\u540e\u5feb\u901f\u9a8c\u8bc1\u4ee3\u7801\u6b63\u786e\u6027\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u548c\u5de5\u5177\uff0c\u53ef\u4ee5\u5728Ubuntu\u4e0a\u9ad8\u6548\u7f16\u8f91\u548c\u7ba1\u7406Python\u9879\u76ee\u3002\u9009\u62e9\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\u548c\u5de5\u5177\uff0c\u5c06\u6781\u5927\u5730\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Ubuntu\u4e0a\u5982\u4f55\u5b89\u88c5Python\u7f16\u8f91\u5668\uff1f<\/strong><br \/>\u8981\u5728Ubuntu\u4e0a\u7f16\u8f91Python\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u591a\u79cd\u7f16\u8f91\u5668\u3002\u5e38\u7528\u7684\u6709Visual Studio Code\u3001PyCharm\u548cSublime Text\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7Ubuntu\u7684\u8f6f\u4ef6\u4e2d\u5fc3\u6216\u547d\u4ee4\u884c\u5b89\u88c5\u8fd9\u4e9b\u7f16\u8f91\u5668\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u547d\u4ee4<code>sudo apt install code<\/code>\u5b89\u88c5Visual Studio Code\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u6253\u5f00\u7f16\u8f91\u5668\u5e76\u5f00\u59cb\u7f16\u8f91Python\u6587\u4ef6\u3002<\/p>\n<p><strong>Ubuntu\u4e2d\u6709\u54ea\u4e9b\u63a8\u8350\u7684Python\u5f00\u53d1\u73af\u5883\uff1f<\/strong><br \/>\u9664\u4e86\u5e38\u89c1\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6765\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002PyCharm\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684IDE\uff0c\u4e13\u4e3aPython\u5f00\u53d1\u8bbe\u8ba1\uff0c\u63d0\u4f9b\u4e86\u8c03\u8bd5\u3001\u4ee3\u7801\u8865\u5168\u548c\u7248\u672c\u63a7\u5236\u7b49\u529f\u80fd\u3002\u53e6\u4e00\u4e2a\u9009\u9879\u662fJupyter Notebook\uff0c\u5b83\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u9879\u76ee\uff0c\u5141\u8bb8\u7528\u6237\u4ee5\u4ea4\u4e92\u65b9\u5f0f\u8fd0\u884c\u4ee3\u7801\u5e76\u53ef\u89c6\u5316\u7ed3\u679c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Ubuntu\u4e0a\u8fd0\u884cPython\u811a\u672c\uff1f<\/strong><br \/>\u7f16\u8f91\u5b8cPython\u811a\u672c\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8fd0\u884c\u5b83\u3002\u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\u5e76\u5bfc\u822a\u5230\u5b58\u50a8\u811a\u672c\u7684\u76ee\u5f55\u3002\u7136\u540e\uff0c\u4f7f\u7528\u547d\u4ee4<code>python3 script_name.py<\/code>\uff08\u5c06<code>script_name.py<\/code>\u66ff\u6362\u4e3a\u60a8\u7684\u6587\u4ef6\u540d\uff09\u6765\u6267\u884c\u811a\u672c\u3002\u5982\u679c\u60a8\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u7248\u672c\u6267\u884c\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Ubuntu\u4e0a\u7f16\u8f91Python\u4ee3\u7801\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u548c\u547d [&hellip;]","protected":false},"author":3,"featured_media":940702,"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\/940699"}],"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=940699"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/940699\/revisions"}],"predecessor-version":[{"id":940704,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/940699\/revisions\/940704"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/940702"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=940699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=940699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=940699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}