{"id":1171211,"date":"2025-01-15T16:32:32","date_gmt":"2025-01-15T08:32:32","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1171211.html"},"modified":"2025-01-15T16:32:36","modified_gmt":"2025-01-15T08:32:36","slug":"python%e5%a6%82%e4%bd%95%e6%89%93%e5%8c%85%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1171211.html","title":{"rendered":"python\u5982\u4f55\u6253\u5305\u5e94\u7528\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26073618\/ef5f2b78-86ff-4b79-92d0-3b2e6c20faf6.webp\" alt=\"python\u5982\u4f55\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>Python\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\u7684\u65b9\u6cd5\u6709\u591a\u79cd<\/strong>\uff0c\u5305\u62ec\u4f7f\u7528PyInstaller\u3001cx_Freeze\u3001py2exe\u7b49\u5de5\u5177\u3002<strong>\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6<\/strong>\uff0c\u4ece\u800c\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u4e2d\u7684\u4e00\u79cd\u2014\u2014PyInstaller\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001PyInstaller\u7684\u4ecb\u7ecd\u4e0e\u5b89\u88c5<\/h3>\n<\/p>\n<p><h4>1. PyInstaller\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>PyInstaller\u662f\u4e00\u4e2a\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002\u5b83\u652f\u6301\u8de8\u5e73\u53f0\u4f7f\u7528\uff0c\u5305\u62ecWindows\u3001macOS\u548cLinux\u3002PyInstaller\u80fd\u591f\u81ea\u52a8\u5206\u6790\u4ee3\u7801\u4e2d\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u5c06\u6240\u6709\u5fc5\u8981\u7684\u5e93\u548c\u6587\u4ef6\u6253\u5305\u5728\u4e00\u8d77\uff0c\u4ee5\u4fbf\u5728\u76ee\u6807\u673a\u5668\u4e0a\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><h4>2. \u5b89\u88c5PyInstaller<\/h4>\n<\/p>\n<p><p>\u8981\u5b89\u88c5PyInstaller\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyinstaller<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528PyInstaller\u6253\u5305Python\u5e94\u7528\u7a0b\u5e8f<\/h3>\n<\/p>\n<p><h4>1. \u57fa\u672c\u4f7f\u7528\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u6253\u5305\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\u975e\u5e38\u5bb9\u6613\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u540d\u4e3a<code>m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n.py<\/code>\u7684Python\u811a\u672c\u3002\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 main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u751f\u6210\u4e00\u4e2a<code>dist<\/code>\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u4e00\u4e2a\u540d\u4e3a<code>main<\/code>\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2. \u914d\u7f6e\u548c\u9009\u9879<\/h4>\n<\/p>\n<p><p>PyInstaller\u63d0\u4f9b\u4e86\u8bb8\u591a\u9009\u9879\u6765\u5b9a\u5236\u6253\u5305\u8fc7\u7a0b\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--onefile<\/code>\u9009\u9879\u5c06\u6240\u6709\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u5355\u72ec\u7684\u53ef\u6267\u884c\u6587\u4ef6\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>\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>--windowed<\/code>\u9009\u9879\u6765\u521b\u5efa\u4e00\u4e2a\u6ca1\u6709\u63a7\u5236\u53f0\u7a97\u53e3\u7684\u56fe\u5f62\u5e94\u7528\u7a0b\u5e8f\uff08\u4ec5\u9002\u7528\u4e8eWindows\u548cmacOS\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --windowed main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5904\u7406\u4f9d\u8d56\u548c\u8d44\u6e90\u6587\u4ef6<\/h3>\n<\/p>\n<p><h4>1. \u6dfb\u52a0\u5916\u90e8\u4f9d\u8d56<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\uff0cPython\u811a\u672c\u53ef\u80fd\u4f9d\u8d56\u4e8e\u5176\u4ed6\u5916\u90e8\u5e93\u6216\u6a21\u5757\u3002PyInstaller\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5e76\u5305\u542b\u5927\u591a\u6570\u4f9d\u8d56\u9879\uff0c\u4f46\u5982\u679c\u67d0\u4e9b\u4f9d\u8d56\u9879\u672a\u88ab\u6b63\u786e\u68c0\u6d4b\u5230\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--hidden-import<\/code>\u9009\u9879\u624b\u52a8\u6dfb\u52a0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --hidden-import=module_name main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5305\u542b\u8d44\u6e90\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u5305\u542b\u989d\u5916\u7684\u8d44\u6e90\u6587\u4ef6\uff08\u5982\u56fe\u50cf\u3001\u914d\u7f6e\u6587\u4ef6\u7b49\uff09\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--add-data<\/code>\u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --add-data &quot;path\/to\/resource;destination_folder&quot; main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u8def\u5f84\u5206\u9694\u7b26\u4f7f\u7528\u5206\u53f7<code>;<\/code>\uff0c\u5728Linux\u548cmacOS\u4e0a\u4f7f\u7528\u5192\u53f7<code>:<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b9a\u5236\u6253\u5305\u8fc7\u7a0b<\/h3>\n<\/p>\n<p><h4>1. \u4fee\u6539.spec\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>PyInstaller\u5728\u7b2c\u4e00\u6b21\u8fd0\u884c\u65f6\u4f1a\u751f\u6210\u4e00\u4e2a<code>.spec<\/code>\u6587\u4ef6\uff0c\u91cc\u9762\u5305\u542b\u4e86\u6253\u5305\u7684\u6240\u6709\u914d\u7f6e\u4fe1\u606f\u3002\u53ef\u4ee5\u7f16\u8f91\u8fd9\u4e2a\u6587\u4ef6\u6765\u5b9a\u5236\u6253\u5305\u8fc7\u7a0b\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5728<code>.spec<\/code>\u6587\u4ef6\u4e2d\u6dfb\u52a0\u6216\u4fee\u6539\u6570\u636e\u6587\u4ef6\u3001\u4e8c\u8fdb\u5236\u6587\u4ef6\u548c\u5176\u4ed6\u6253\u5305\u9009\u9879\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># myscript.spec<\/p>\n<p>a = Analysis([&#39;myscript.py&#39;],<\/p>\n<p>             pathex=[&#39;\/path\/to\/project&#39;],<\/p>\n<p>             binaries=[],<\/p>\n<p>             datas=[(&#39;data_file.txt&#39;, &#39;destination_folder&#39;)],<\/p>\n<p>             hiddenimports=[],<\/p>\n<p>             hookspath=[],<\/p>\n<p>             runtime_hooks=[],<\/p>\n<p>             excludes=[])<\/p>\n<p>pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)<\/p>\n<p>exe = EXE(pyz,<\/p>\n<p>          a.scripts,<\/p>\n<p>          [],<\/p>\n<p>          exclude_binaries=True,<\/p>\n<p>          name=&#39;myscript&#39;,<\/p>\n<p>          debug=False,<\/p>\n<p>          bootloader_ignore_signals=False,<\/p>\n<p>          strip=False,<\/p>\n<p>          upx=True,<\/p>\n<p>          console=True )<\/p>\n<p>coll = COLLECT(exe,<\/p>\n<p>               a.binaries,<\/p>\n<p>               a.zipfiles,<\/p>\n<p>               a.datas,<\/p>\n<p>               strip=False,<\/p>\n<p>               upx=True,<\/p>\n<p>               upx_exclude=[],<\/p>\n<p>               name=&#39;myscript&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u91cd\u65b0\u6253\u5305<\/h4>\n<\/p>\n<p><p>\u7f16\u8f91\u5b8c<code>.spec<\/code>\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u65b0\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller myscript.spec<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><h4>1. \u7f3a\u5931\u6a21\u5757<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\uff0cPyInstaller\u53ef\u80fd\u65e0\u6cd5\u68c0\u6d4b\u5230\u6240\u6709\u7684\u4f9d\u8d56\u6a21\u5757\u3002\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u52a8\u6001\u5bfc\u5165\u6216\u5176\u4ed6\u590d\u6742\u7684\u5bfc\u5165\u673a\u5236\u5f15\u8d77\u7684\u3002\u53ef\u4ee5\u5728\u811a\u672c\u4e2d\u663e\u5f0f\u5bfc\u5165\u6a21\u5757\uff0c\u6216\u8005\u4f7f\u7528<code>--hidden-import<\/code>\u9009\u9879\u624b\u52a8\u6dfb\u52a0\u3002<\/p>\n<\/p>\n<p><h4>2. \u6587\u4ef6\u8def\u5f84\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u6587\u4ef6\u8def\u5f84\u53ef\u80fd\u4f1a\u53d8\u5f97\u590d\u6742\u3002\u53ef\u4ee5\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u6765\u751f\u6210\u8de8\u5e73\u53f0\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>base_path = os.path.dirname(__file__)<\/p>\n<p>file_path = os.path.join(base_path, &#39;data&#39;, &#39;data_file.txt&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5176\u4ed6\u6253\u5305\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>1. cx_Freeze<\/h4>\n<\/p>\n<p><p>cx_Freeze\u662f\u53e6\u4e00\u4e2a\u5c06Python\u811a\u672c\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002\u5b83\u652f\u6301Windows\u3001macOS\u548cLinux\uff0c\u5e76\u63d0\u4f9b\u4e86\u4e00\u4e9b\u4e0ePyInstaller\u7c7b\u4f3c\u7684\u529f\u80fd\u3002\u8981\u5b89\u88c5cx_Freeze\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install cx_Freeze<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\u6765\u914d\u7f6e\u6253\u5305\u9009\u9879\uff0c\u5e76\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><h4>2. py2exe<\/h4>\n<\/p>\n<p><p>py2exe\u662f\u4e13\u95e8\u7528\u4e8e\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3aWindows\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002\u8981\u5b89\u88c5py2exe\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\u6765\u914d\u7f6e\u6253\u5305\u9009\u9879\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6253\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528PyInstaller\u3001cx_Freeze\u6216py2exe\u7b49\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06Python\u811a\u672c\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4ece\u800c\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002<strong>PyInstaller\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u5de5\u5177<\/strong>\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u6253\u5305\u9700\u6c42\u3002<strong>\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898<\/strong>\uff0c\u5982\u7f3a\u5931\u6a21\u5757\u6216\u6587\u4ef6\u8def\u5f84\u95ee\u9898\uff0c\u4f46\u8fd9\u4e9b\u95ee\u9898\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u914d\u7f6e\u6216\u4ee3\u7801\u6765\u89e3\u51b3\u3002<strong>\u6b64\u5916\uff0ccx_Freeze\u548cpy2exe\u4e5f\u662f\u4e0d\u9519\u7684\u66ff\u4ee3\u9009\u62e9<\/strong>\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u548c\u4f7f\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff1f<\/strong><br \/>\u8981\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u6216py2exe\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5c06Python\u811a\u672c\u53ca\u5176\u4f9d\u8d56\u9879\u6253\u5305\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u7528\u6237\u65e0\u9700\u5b89\u88c5Python\u73af\u5883\u5373\u53ef\u8fd0\u884c\u3002\u4f7f\u7528PyInstaller\u7684\u57fa\u672c\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5PyInstaller\u3001\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u4f60\u7684\u811a\u672c\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c<code>pyinstaller your_script.py<\/code>\u547d\u4ee4\u3002\u6210\u529f\u540e\uff0c\u4f60\u5c06\u5728dist\u6587\u4ef6\u5939\u4e2d\u627e\u5230\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p><strong>\u6253\u5305Python\u5e94\u7528\u7a0b\u5e8f\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4f9d\u8d56\u9879\uff1f<\/strong><br \/>\u5728\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u786e\u4fdd\u6240\u6709\u4f9d\u8d56\u9879\u90fd\u88ab\u6b63\u786e\u8bc6\u522b\u548c\u5305\u542b\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002\u4f7f\u7528requirements.txt\u6587\u4ef6\u5217\u51fa\u6240\u6709\u9700\u8981\u7684\u5e93\uff0c\u5e76\u5728\u6253\u5305\u5de5\u5177\u4e2d\u6307\u5b9a\u8fd9\u4e9b\u4f9d\u8d56\u9879\u3002\u67d0\u4e9b\u5e93\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u914d\u7f6e\uff0c\u6bd4\u5982\u52a8\u6001\u94fe\u63a5\u5e93\u6216\u6570\u636e\u6587\u4ef6\uff0c\u786e\u4fdd\u5728\u6253\u5305\u547d\u4ee4\u4e2d\u6b63\u786e\u6dfb\u52a0\u8fd9\u4e9b\u8d44\u6e90\uff0c\u4ee5\u907f\u514d\u8fd0\u884c\u65f6\u9519\u8bef\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u6253\u5305Python\u5e94\u7528\u7a0b\u5e8f\uff1f<\/strong><br \/>\u6253\u5305Python\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u8981\u8003\u8651\u76ee\u6807\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e0d\u540c\u3002\u5927\u591a\u6570\u6253\u5305\u5de5\u5177\u652f\u6301\u8de8\u5e73\u53f0\u6253\u5305\uff0c\u4f46\u5efa\u8bae\u5728\u6bcf\u4e2a\u76ee\u6807\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fdb\u884c\u6253\u5305\u3002\u4f8b\u5982\uff0c\u4f7f\u7528PyInstaller\u5728Windows\u4e0a\u6253\u5305\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u80fd\u65e0\u6cd5\u76f4\u63a5\u5728Linux\u4e0a\u8fd0\u884c\uff0c\u56e0\u6b64\u6700\u597d\u5728\u5404\u81ea\u7684\u73af\u5883\u4e2d\u8fdb\u884c\u6253\u5305\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u6ce8\u610f\u6587\u4ef6\u8def\u5f84\u7684\u683c\u5f0f\u548c\u4f9d\u8d56\u9879\u7684\u517c\u5bb9\u6027\uff0c\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u5728\u4e0d\u540c\u5e73\u53f0\u4e0a\u7684\u53ef\u7528\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528PyInstaller\u3001cx_Freeze\u3001py2exe\u7b49\u5de5\u5177\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1171221,"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\/1171211"}],"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=1171211"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1171211\/revisions"}],"predecessor-version":[{"id":1171222,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1171211\/revisions\/1171222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1171221"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1171211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1171211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1171211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}