{"id":966045,"date":"2024-12-27T04:43:50","date_gmt":"2024-12-26T20:43:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/966045.html"},"modified":"2024-12-27T04:43:53","modified_gmt":"2024-12-26T20:43:53","slug":"python%e7%bc%96%e8%af%91%e7%9a%84%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/966045.html","title":{"rendered":"python\u7f16\u8bd1\u7684\u5982\u4f55\u4fdd\u5b58"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24182026\/6adb3ab6-f7fa-47b1-b77d-6b0849e8658a.webp\" alt=\"python\u7f16\u8bd1\u7684\u5982\u4f55\u4fdd\u5b58\" \/><\/p>\n<p><p> \u5f00\u5934\u6bb5\u843d\uff1a<br \/><strong>Python\u7f16\u8bd1\u7684\u4fdd\u5b58\u53ef\u4ee5\u901a\u8fc7\u5c06Python\u6e90\u4ee3\u7801\u8f6c\u6362\u4e3a\u5b57\u8282\u7801\u6587\u4ef6\u3001\u4f7f\u7528\u6253\u5305\u5de5\u5177\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6\u6216\u76f4\u63a5\u4fdd\u5b58\u811a\u672c\u4e3a.py\u6587\u4ef6<\/strong>\u3002Python\u662f\u4e00\u79cd\u89e3\u91ca\u578b\u8bed\u8a00\uff0c\u901a\u5e38\u4e0d\u9700\u8981\u7f16\u8bd1\u6b65\u9aa4\u3002\u7136\u800c\uff0c\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\u6216\u4fdd\u62a4\u4ee3\u7801\uff0c\u6709\u65f6\u9700\u8981\u5c06Python\u811a\u672c\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6\u6216\u5b57\u8282\u7801\u6587\u4ef6\u3002\u5b57\u8282\u7801\u6587\u4ef6\u662f.pyc\u683c\u5f0f\uff0c\u53ef\u4ee5\u901a\u8fc7Python\u89e3\u91ca\u5668\u81ea\u52a8\u751f\u6210\uff0c\u4fbf\u4e8e\u4e0b\u6b21\u66f4\u5feb\u5730\u6267\u884c\u3002\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u7b49\u53ef\u4ee5\u5c06Python\u811a\u672c\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5206\u53d1\u548c\u90e8\u7f72\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u52a3\uff0c\u5177\u4f53\u4f7f\u7528\u65f6\u9700\u6839\u636e\u9700\u6c42\u9009\u62e9\u3002\u4f8b\u5982\uff0c\u6253\u5305\u5de5\u5177\u4e0d\u4ec5\u80fd\u4fdd\u62a4\u4ee3\u7801\uff0c\u8fd8\u80fd\u5c06\u6240\u6709\u4f9d\u8d56\u4e00\u8d77\u6253\u5305\uff0c\u65b9\u4fbf\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u673a\u5668\u4e0a\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001PYTHON\u5b57\u8282\u7801\u7684\u751f\u6210\u4e0e\u4fdd\u5b58<\/p>\n<\/p>\n<p><p>Python\u662f\u4e00\u79cd\u89e3\u91ca\u6027\u8bed\u8a00\uff0c\u901a\u5e38\u5728\u6267\u884c\u65f6\u5373\u65f6\u7f16\u8bd1\u4e3a\u5b57\u8282\u7801\uff0c\u7136\u540e\u7531Python\u865a\u62df\u673a\uff08PVM\uff09\u6267\u884c\u3002\u5b57\u8282\u7801\u662f\u4e2d\u95f4\u4ee3\u7801\uff0c\u4ecb\u4e8e\u9ad8\u5c42\u6b21\u6e90\u4ee3\u7801\u548c\u673a\u5668\u7801\u4e4b\u95f4\uff0c\u65e8\u5728\u63d0\u9ad8\u4ee3\u7801\u7684\u6267\u884c\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><p>1.1 \u81ea\u52a8\u751f\u6210\u5b57\u8282\u7801<\/p>\n<\/p>\n<p><p>Python\u89e3\u91ca\u5668\u5728\u9996\u6b21\u5bfc\u5165\u6a21\u5757\u65f6\uff0c\u4f1a\u81ea\u52a8\u751f\u6210\u5b57\u8282\u7801\u6587\u4ef6\uff08.pyc\u6587\u4ef6\uff09\uff0c\u5e76\u5b58\u50a8\u5728__pycache__\u76ee\u5f55\u4e0b\u3002\u8fd9\u79cd\u81ea\u52a8\u751f\u6210\u673a\u5236\u4f7f\u5f97\u540e\u7eed\u6267\u884c\u540c\u4e00\u811a\u672c\u65f6\u80fd\u591f\u8df3\u8fc7\u6e90\u4ee3\u7801\u89e3\u6790\u548c\u5b57\u8282\u7801\u751f\u6210\u6b65\u9aa4\uff0c\u4ece\u800c\u63d0\u9ad8\u6267\u884c\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><p>1.2 \u624b\u52a8\u7f16\u8bd1\u5b57\u8282\u7801<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u624b\u52a8\u751f\u6210\u5b57\u8282\u7801\u6587\u4ef6\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>compileall<\/code>\u6a21\u5757\u5b9e\u73b0\u3002<code>compileall<\/code>\u53ef\u4ee5\u7f16\u8bd1\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6240\u6709Python\u6587\u4ef6\uff0c\u751f\u6210\u5b57\u8282\u7801\u6587\u4ef6\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216\u7f16\u5199Python\u811a\u672c\u90fd\u53ef\u4ee5\u5b8c\u6210\u8fd9\u4e2a\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m compileall &lt;directory&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u547d\u4ee4\uff0c\u53ef\u4ee5\u6279\u91cf\u7f16\u8bd1\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6240\u6709Python\u811a\u672c\uff0c\u751f\u6210\u5b57\u8282\u7801\u6587\u4ef6\uff0c\u4ee5\u4fbf\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u6253\u5305\u5de5\u5177\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5c06Python\u811a\u672c\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4ee5\u4fbf\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u673a\u5668\u4e0a\u8fd0\u884c\u3002\u8fd9\u901a\u5e38\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\uff0c\u5982PyInstaller\u3001cx_Freeze\u7b49\u3002<\/p>\n<\/p>\n<p><p>2.1 PyInstaller\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>PyInstaller\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684Python\u6253\u5305\u5de5\u5177\uff0c\u652f\u6301\u5c06Python\u811a\u672c\u6253\u5305\u4e3aWindows\u3001macOS\u548cLinux\u5e73\u53f0\u4e0a\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002PyInstaller\u4f1a\u5c06Python\u89e3\u91ca\u5668\u548c\u6240\u6709\u4f9d\u8d56\u6253\u5305\u5728\u4e00\u8d77\uff0c\u4f7f\u5f97\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u673a\u5668\u4e0a\u76f4\u63a5\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528PyInstaller\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile &lt;script.py&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>--onefile<\/code>\u9009\u9879\u8868\u793a\u5c06\u6240\u6709\u5185\u5bb9\u6253\u5305\u6210\u4e00\u4e2a\u5355\u72ec\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002PyInstaller\u8fd8\u652f\u6301\u8bb8\u591a\u5176\u4ed6\u9009\u9879\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><p>2.2 cx_Freeze\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>cx_Freeze\u662f\u53e6\u4e00\u4e2a\u5e38\u7528\u7684Python\u6253\u5305\u5de5\u5177\uff0c\u4e0ePyInstaller\u7c7b\u4f3c\uff0c\u5b83\u53ef\u4ee5\u5c06Python\u811a\u672c\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002cx_Freeze\u652f\u6301Windows\u548cLinux\u5e73\u53f0\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u6216\u547d\u4ee4\u884c\u53c2\u6570\u8fdb\u884c\u8be6\u7ec6\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528cx_Freeze\u8fdb\u884c\u6253\u5305\u65f6\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2asetup.py\u6587\u4ef6\uff0c\u5b9a\u4e49\u6253\u5305\u914d\u7f6e\u3002\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6253\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py build<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u914d\u7f6e\u6253\u5305\u9009\u9879\uff0c\u5e76\u751f\u6210\u6240\u9700\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u76f4\u63a5\u4fdd\u5b58\u4e3a.py\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5927\u591a\u6570Python\u811a\u672c\uff0c\u76f4\u63a5\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u76f4\u63a5\uff0c\u9002\u7528\u4e8e\u5f00\u53d1\u548c\u8c03\u8bd5\u9636\u6bb5\u3002Python\u89e3\u91ca\u5668\u53ef\u4ee5\u76f4\u63a5\u6267\u884c.py\u6587\u4ef6\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u7684\u7f16\u8bd1\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>3.1 .py\u6587\u4ef6\u7684\u4f18\u70b9<\/p>\n<\/p>\n<p><p>\u76f4\u63a5\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\u7684\u4f18\u70b9\u5728\u4e8e\u7b80\u5355\u6613\u7528\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u968f\u65f6\u4fee\u6539\u548c\u8c03\u8bd5\u4ee3\u7801\uff0c\u800c\u4e0d\u9700\u8981\u62c5\u5fc3\u7f16\u8bd1\u8fc7\u7a0b\u3002\u540c\u65f6\uff0c.py\u6587\u4ef6\u662f\u4eba\u7c7b\u53ef\u8bfb\u7684\uff0c\u4fbf\u4e8e\u5171\u4eab\u548c\u534f\u4f5c\u3002<\/p>\n<\/p>\n<p><p>3.2 \u9002\u7528\u573a\u666f<\/p>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u5927\u591a\u6570\u5f00\u53d1\u548c\u8c03\u8bd5\u573a\u666f\uff0c\u5c24\u5176\u662f\u5728\u9700\u8981\u9891\u7e41\u4fee\u6539\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\u3002\u5bf9\u4e8e\u9700\u8981\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\u8fd0\u884c\u7684\u811a\u672c\uff0c.py\u6587\u4ef6\u4e5f\u663e\u5f97\u683c\u5916\u65b9\u4fbf\uff0c\u56e0\u4e3aPython\u89e3\u91ca\u5668\u5728\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90fd\u6709\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u9009\u62e9\u5408\u9002\u7684\u4fdd\u5b58\u65b9\u5f0f<\/p>\n<\/p>\n<p><p>\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684Python\u7f16\u8bd1\u4fdd\u5b58\u65b9\u5f0f\u81f3\u5173\u91cd\u8981\u3002\u9009\u62e9\u6b63\u786e\u7684\u65b9\u5f0f\u4e0d\u4ec5\u80fd\u63d0\u9ad8\u6548\u7387\uff0c\u8fd8\u80fd\u4fdd\u8bc1\u4ee3\u7801\u7684\u5b89\u5168\u6027\u548c\u53ef\u79fb\u690d\u6027\u3002<\/p>\n<\/p>\n<p><p>4.1 \u6027\u80fd\u9700\u6c42<\/p>\n<\/p>\n<p><p>\u5982\u679c\u5bf9\u6027\u80fd\u6709\u8f83\u9ad8\u8981\u6c42\uff0c\u53ef\u4ee5\u8003\u8651\u5c06\u4ee3\u7801\u7f16\u8bd1\u4e3a\u5b57\u8282\u7801\u6587\u4ef6\uff0c\u4ee5\u4fbf\u52a0\u5feb\u6267\u884c\u901f\u5ea6\u3002\u8fd9\u79cd\u65b9\u5f0f\u9002\u7528\u4e8e\u9891\u7e41\u8fd0\u884c\u7684\u811a\u672c\u6216\u9700\u8981\u5728\u8d44\u6e90\u6709\u9650\u7684\u73af\u5883\u4e2d\u6267\u884c\u7684\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>4.2 \u5b89\u5168\u9700\u6c42<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u4fdd\u62a4\u4ee3\u7801\u4e0d\u88ab\u53cd\u7f16\u8bd1\u6216\u7be1\u6539\u3002\u8fd9\u65f6\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u6253\u5305\u5de5\u5177\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4ece\u800c\u9690\u85cf\u6e90\u4ee3\u7801\u7684\u5b9e\u73b0\u7ec6\u8282\u3002<\/p>\n<\/p>\n<p><p>4.3 \u517c\u5bb9\u6027\u9700\u6c42<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u548c\u786c\u4ef6\u5e73\u53f0\u4e0a\u8fd0\u884c\u7684\u5e94\u7528\uff0c\u4f7f\u7528\u6253\u5305\u5de5\u5177\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u673a\u5668\u4e0a\u76f4\u63a5\u8fd0\u884c\uff0c\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u517c\u5bb9\u6027\u548c\u79fb\u690d\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u5b57\u8282\u7801\u6587\u4ef6\u3001\u4f7f\u7528\u6253\u5305\u5de5\u5177\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6\u6216\u76f4\u63a5\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u7f16\u8bd1\u4fdd\u5b58\u65b9\u5f0f\u3002\u4e86\u89e3\u6bcf\u79cd\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9\uff0c\u6709\u52a9\u4e8e\u5728\u9879\u76ee\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u505a\u51fa\u66f4\u660e\u667a\u7684\u51b3\u7b56\u3002\u65e0\u8bba\u662f\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\u3001\u4fdd\u62a4\u4ee3\u7801\uff0c\u8fd8\u662f\u4e3a\u4e86\u63d0\u9ad8\u517c\u5bb9\u6027\u548c\u53ef\u79fb\u690d\u6027\uff0c\u9009\u62e9\u5408\u9002\u7684\u4fdd\u5b58\u65b9\u5f0f\u90fd\u662fPython\u5f00\u53d1\u4e2d\u7684\u91cd\u8981\u4e00\u73af\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u7f16\u8bd1\u7684\u7a0b\u5e8f\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u6216cx_Freeze\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u8fd9\u4e9b\u5de5\u5177\u4f1a\u5c06Python\u89e3\u91ca\u5668\u548c\u4f60\u7684\u4ee3\u7801\u6253\u5305\u5728\u4e00\u8d77\uff0c\u4f7f\u5f97\u7528\u6237\u65e0\u9700\u5b89\u88c5Python\u5373\u53ef\u8fd0\u884c\u7a0b\u5e8f\u3002\u5b89\u88c5\u8fd9\u4e9b\u5de5\u5177\u540e\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u76f8\u5e94\u7684\u547d\u4ee4\u5373\u53ef\u751f\u6210.exe\u6587\u4ef6\uff08\u5728Windows\u4e0a\uff09\u6216\u5176\u4ed6\u5e73\u53f0\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p><strong>\u7f16\u8bd1\u540e\u7684Python\u7a0b\u5e8f\u662f\u5426\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\uff1f<\/strong><br \/>\u7f16\u8bd1\u540e\u7684\u7a0b\u5e8f\u901a\u5e38\u53ea\u80fd\u5728\u4e0e\u5176\u521b\u5efa\u65f6\u76f8\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u5728Windows\u4e0a\u4f7f\u7528PyInstaller\u7f16\u8bd1\u4e86\u4e00\u4e2aPython\u7a0b\u5e8f\uff0c\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ea\u80fd\u5728Windows\u4e0a\u8fd0\u884c\u3002\u5982\u679c\u5e0c\u671b\u5728\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\uff0c\u5efa\u8bae\u5728\u6bcf\u4e2a\u76ee\u6807\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5355\u72ec\u7f16\u8bd1\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fddPython\u7f16\u8bd1\u7684\u7a0b\u5e8f\u5728\u8fd0\u884c\u65f6\u4e0d\u4f1a\u51fa\u73b0\u4f9d\u8d56\u95ee\u9898\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u5728\u7f16\u8bd1\u65f6\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u907f\u514d\u4f9d\u8d56\u95ee\u9898\u3002\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u73af\u5883\u540e\uff0c\u5b89\u88c5\u6240\u6709\u5fc5\u8981\u7684\u5e93\u548c\u4f9d\u8d56\u9879\uff0c\u7136\u540e\u5728\u8be5\u73af\u5883\u4e2d\u7f16\u8bd1\u7a0b\u5e8f\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u5728\u8fd0\u884c\u65f6\u62e5\u6709\u6240\u6709\u5fc5\u9700\u7684\u4f9d\u8d56\uff0c\u51cf\u5c11\u4e86\u7531\u4e8e\u73af\u5883\u5dee\u5f02\u5bfc\u81f4\u7684\u9519\u8bef\u53d1\u751f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d\uff1aPython\u7f16\u8bd1\u7684\u4fdd\u5b58\u53ef\u4ee5\u901a\u8fc7\u5c06Python\u6e90\u4ee3\u7801\u8f6c\u6362\u4e3a\u5b57\u8282\u7801\u6587\u4ef6\u3001\u4f7f\u7528\u6253\u5305\u5de5\u5177\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6\u6216\u76f4\u63a5 [&hellip;]","protected":false},"author":3,"featured_media":966053,"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\/966045"}],"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=966045"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/966045\/revisions"}],"predecessor-version":[{"id":966054,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/966045\/revisions\/966054"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/966053"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=966045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=966045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=966045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}