{"id":1127341,"date":"2025-01-08T20:09:26","date_gmt":"2025-01-08T12:09:26","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127341.html"},"modified":"2025-01-08T20:09:26","modified_gmt":"2025-01-08T12:09:26","slug":"%e5%a6%82%e4%bd%95%e5%b0%86python%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90exe%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127341.html","title":{"rendered":"\u5982\u4f55\u5c06python\u4ee3\u7801\u751f\u6210exe\u6587\u4ef6\u683c\u5f0f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25094355\/f7e63f1f-d192-4bf6-b1b3-498cd47f98c8.webp\" alt=\"\u5982\u4f55\u5c06python\u4ee3\u7801\u751f\u6210exe\u6587\u4ef6\u683c\u5f0f\" \/><\/p>\n<p><p> <strong>\u8981\u5c06Python\u4ee3\u7801\u751f\u6210exe\u6587\u4ef6\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u3001py2exe\u548cauto-py-to-exe\u7b49\u3002<\/strong>\u5176\u4e2d\uff0c<strong>PyInstaller<\/strong>\u662f\u4e00\u79cd\u5e38\u89c1\u4e14\u5f3a\u5927\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u80fd\u591f\u81ea\u52a8\u5206\u6790\u4ee3\u7801\u4f9d\u8d56\u5173\u7cfb\u5e76\u6253\u5305\u6240\u6709\u5fc5\u8981\u6587\u4ef6\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528PyInstaller\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5PyInstaller<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u548cpip\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5PyInstaller\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\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1\u3001\u521b\u5efa\u7b80\u5355\u7684Python\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\u6587\u4ef6 <code>m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n.py<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># main.py<\/p>\n<p>print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fd0\u884cPyInstaller\u547d\u4ee4<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230\u4f60\u7684Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\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>\u8fd9\u91cc\u7684 <code>--onefile<\/code> \u9009\u9879\u8868\u793a\u5c06\u6240\u6709\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u5355\u72ec\u7684exe\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4e86\u89e3PyInstaller\u751f\u6210\u7684\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u8fd0\u884c\u5b8c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0c\u4f60\u4f1a\u6ce8\u610f\u5230\u751f\u6210\u4e86\u51e0\u4e2a\u6587\u4ef6\u5939\u548c\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>build\/<\/strong>\uff1a\u7528\u4e8e\u5b58\u653e\u4e34\u65f6\u6587\u4ef6\u548c\u4e2d\u95f4\u7ed3\u679c\u3002<\/li>\n<li><strong>dist\/<\/strong>\uff1a\u6700\u7ec8\u751f\u6210\u7684exe\u6587\u4ef6\u4f1a\u5b58\u653e\u5728\u6b64\u6587\u4ef6\u5939\u4e2d\u3002<\/li>\n<li><strong>main.spec<\/strong>\uff1a\u8fd9\u662f\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u8bb0\u5f55\u4e86\u6253\u5305\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p><p>\u4f60\u53ef\u4ee5\u5728 <code>dist\/<\/code> \u6587\u4ef6\u5939\u4e2d\u627e\u5230 <code>main.exe<\/code>\uff0c\u53cc\u51fb\u8fd0\u884c\u5b83\uff0c\u5e94\u8be5\u4f1a\u770b\u5230\u8f93\u51fa &quot;Hello, World!&quot;\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u4f9d\u8d56\u9879<\/h3>\n<\/p>\n<p><h4>1\u3001\u81ea\u52a8\u68c0\u6d4b\u4f9d\u8d56\u9879<\/h4>\n<\/p>\n<p><p>PyInstaller\u4f1a\u81ea\u52a8\u68c0\u6d4b\u4f60\u7684\u811a\u672c\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff0c\u4f46\u6709\u65f6\u5b83\u53ef\u80fd\u65e0\u6cd5\u68c0\u6d4b\u5230\u6240\u6709\u4f9d\u8d56\u9879\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u624b\u52a8\u6dfb\u52a0\uff1a<\/p>\n<\/p>\n<p><p>\u5728 <code>main.spec<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = Analysis([&#39;main.py&#39;],<\/p>\n<p>             pathex=[&#39;\/path\/to\/your\/project&#39;],<\/p>\n<p>             binaries=[],<\/p>\n<p>             datas=[(&#39;\/path\/to\/your\/datafile&#39;, &#39;data&#39;)],<\/p>\n<p>             hiddenimports=[&#39;module1&#39;, &#39;module2&#39;],<\/p>\n<p>             hookspath=[],<\/p>\n<p>             runtime_hooks=[],<\/p>\n<p>             excludes=[],<\/p>\n<p>             win_no_prefer_redirects=False,<\/p>\n<p>             win_private_assemblies=False,<\/p>\n<p>             cipher=block_cipher,<\/p>\n<p>             noarchive=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528requirements.txt<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u7684\u9879\u76ee\u6709\u5f88\u591a\u4f9d\u8d56\u9879\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a <code>requirements.txt<\/code> \u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u6240\u6709\u4f9d\u8d56\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install -r requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f18\u5316\u548c\u5b9a\u5236\u751f\u6210\u7684exe\u6587\u4ef6<\/h3>\n<\/p>\n<p><h4>1\u3001\u6dfb\u52a0\u56fe\u6807<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u901a\u8fc7 <code>--icon<\/code> \u9009\u9879\u6765\u6dfb\u52a0\u81ea\u5b9a\u4e49\u56fe\u6807\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --icon=youricon.ico main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u9690\u85cf\u63a7\u5236\u53f0\u7a97\u53e3<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u4e0d\u5e0c\u671b\u5728\u8fd0\u884cexe\u6587\u4ef6\u65f6\u663e\u793a\u63a7\u5236\u53f0\u7a97\u53e3\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>--noconsole<\/code> \u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --noconsole main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6dfb\u52a0\u7248\u672c\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u5728 <code>main.spec<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u7248\u672c\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">exe = EXE(pyz,<\/p>\n<p>          a.scripts,<\/p>\n<p>          a.binaries,<\/p>\n<p>          a.zipfiles,<\/p>\n<p>          a.datas,<\/p>\n<p>          [],<\/p>\n<p>          name=&#39;main&#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>          runtime_tmpdir=None,<\/p>\n<p>          console=True,<\/p>\n<p>          version=&#39;version.txt&#39;,<\/p>\n<p>          icon=&#39;youricon.ico&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><h4>1\u3001\u6253\u5305\u540eexe\u6587\u4ef6\u8fc7\u5927<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u751f\u6210\u7684exe\u6587\u4ef6\u8fc7\u5927\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528UPX\u5de5\u5177\u8fdb\u884c\u538b\u7f29\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install upx<\/p>\n<p>pyinstaller --onefile --upx-dir=\/path\/to\/upx main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fd0\u884cexe\u6587\u4ef6\u65f6\u7f3a\u5c11DLL\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u8fd0\u884cexe\u6587\u4ef6\u65f6\u63d0\u793a\u7f3a\u5c11DLL\u6587\u4ef6\uff0c\u53ef\u4ee5\u624b\u52a8\u5c06\u8fd9\u4e9bDLL\u6587\u4ef6\u590d\u5236\u5230 <code>dist\/<\/code> \u76ee\u5f55\u4e2d\uff0c\u6216\u8005\u5728 <code>main.spec<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528auto-py-to-exe\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u66f4\u559c\u6b22\u56fe\u5f62\u754c\u9762\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>auto-py-to-exe<\/code>\uff0c\u5b83\u662f\u57fa\u4e8ePyInstaller\u7684\u4e00\u4e2a\u56fe\u5f62\u754c\u9762\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5auto-py-to-exe<\/h4>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install auto-py-to-exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fd0\u884cauto-py-to-exe<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\u56fe\u5f62\u754c\u9762\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">auto-py-to-exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u914d\u7f6e\u6253\u5305\u9009\u9879<\/h4>\n<\/p>\n<p><p>\u5728\u56fe\u5f62\u754c\u9762\u4e2d\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9Python\u811a\u672c\uff0c\u914d\u7f6e\u5404\u79cd\u9009\u9879\uff08\u5982\u56fe\u6807\u3001\u9690\u85cf\u63a7\u5236\u53f0\u7b49\uff09\uff0c\u5e76\u70b9\u51fb\u201cConvert .py to .exe\u201d\u6309\u94ae\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u4f7f\u7528cx_Freeze\u5de5\u5177<\/h3>\n<\/p>\n<p><p><code>cx_Freeze<\/code> \u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684Python\u6253\u5305\u5de5\u5177\uff0c\u5b83\u4e5f\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5cx_Freeze<\/h4>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install cx_Freeze<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u7f16\u5199setup\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a <code>setup.py<\/code> \u6587\u4ef6\uff0c\u7528\u4e8e\u914d\u7f6e\u6253\u5305\u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># setup.py<\/p>\n<p>from cx_Freeze import setup, Executable<\/p>\n<p>setup(<\/p>\n<p>    name = &quot;main&quot;,<\/p>\n<p>    version = &quot;0.1&quot;,<\/p>\n<p>    description = &quot;My Python script&quot;,<\/p>\n<p>    executables = [Executable(&quot;main.py&quot;)]<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8fd0\u884csetup\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\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>\u751f\u6210\u7684exe\u6587\u4ef6\u4f1a\u5b58\u653e\u5728 <code>build\/<\/code> \u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u4f7f\u7528py2exe\u5de5\u5177<\/h3>\n<\/p>\n<p><p><code>py2exe<\/code> \u662f\u53e6\u4e00\u4e2a\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3aWindows\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5py2exe<\/h4>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u7f16\u5199setup\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a <code>setup.py<\/code> \u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># setup.py<\/p>\n<p>from distutils.core import setup<\/p>\n<p>import py2exe<\/p>\n<p>setup(console=[&#39;main.py&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8fd0\u884csetup\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u751f\u6210\u7684exe\u6587\u4ef6\u4f1a\u5b58\u653e\u5728 <code>dist\/<\/code> \u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u65e0\u8bba\u4f60\u9009\u62e9\u54ea\u79cd\u5de5\u5177\uff0c\u5173\u952e\u662f\u7406\u89e3\u6bcf\u4e2a\u5de5\u5177\u7684\u914d\u7f6e\u9009\u9879\u548c\u751f\u6210\u8fc7\u7a0b\u3002<\/strong>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u6210\u529f\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\uff0c\u5e76\u6839\u636e\u9700\u8981\u8fdb\u884c\u4f18\u5316\u548c\u5b9a\u5236\u3002\u7279\u522b\u662f\u5bf9\u4e8e\u590d\u6742\u9879\u76ee\uff0c\u638c\u63e1\u8fd9\u4e9b\u5de5\u5177\u7684\u9ad8\u7ea7\u7528\u6cd5\u5c06\u6781\u5927\u5730\u63d0\u5347\u4f60\u7684\u6253\u5305\u6548\u7387\u548c\u6548\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u9700\u8981\u54ea\u4e9b\u5de5\u5177\uff1f<\/strong><br \/>\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5e38\u7528\u7684\u5de5\u5177\u6709PyInstaller\u3001cx_Freeze\u548cpy2exe\u7b49\u3002PyInstaller\u662f\u6700\u4e3a\u6d41\u884c\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u652f\u6301\u591a\u79cd\u5e73\u53f0\uff0c\u4f7f\u7528\u65b9\u4fbf\u3002\u7528\u6237\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u7b80\u5355\u7684\u6307\u4ee4\uff0c\u5373\u53ef\u5c06.py\u6587\u4ef6\u6253\u5305\u4e3a.exe\u6587\u4ef6\u3002cx_Freeze\u4e5f\u5f88\u53d7\u6b22\u8fce\uff0c\u7279\u522b\u662f\u5728\u9700\u8981\u521b\u5efa\u8de8\u5e73\u53f0\u5e94\u7528\u65f6\u3002<\/p>\n<p><strong>\u751f\u6210exe\u6587\u4ef6\u540e\uff0c\u5982\u4f55\u786e\u4fdd\u5b83\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\uff1f<\/strong><br \/>\u5728\u4f7f\u7528PyInstaller\u7b49\u5de5\u5177\u751f\u6210exe\u6587\u4ef6\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u5c06Python\u89e3\u91ca\u5668\u548c\u6240\u9700\u7684\u5e93\u4e00\u5e76\u6253\u5305\u5230\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u3002\u8fd9\u610f\u5473\u7740\u5373\u4f7f\u76ee\u6807\u8ba1\u7b97\u673a\u6ca1\u6709\u5b89\u88c5Python\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u8fd0\u884c\u8be5exe\u6587\u4ef6\u3002\u4e3a\u4e86\u786e\u4fdd\u6587\u4ef6\u7684\u5b8c\u6574\u6027\uff0c\u5efa\u8bae\u5728\u4e0d\u540c\u7684\u8ba1\u7b97\u673a\u4e0a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u4ee5\u786e\u8ba4\u53ef\u6267\u884c\u6587\u4ef6\u7684\u517c\u5bb9\u6027\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u901a\u8fc7GUI\u5de5\u5177\u6765\u5b9e\u73b0Python\u4ee3\u7801\u7684exe\u6587\u4ef6\u8f6c\u6362\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u6709\u4e00\u4e9bGUI\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u3002\u4f8b\u5982\uff0cPyInstaller GUI\u548cNuitka\u90fd\u63d0\u4f9b\u4e86\u56fe\u5f62\u754c\u9762\uff0c\u7528\u6237\u65e0\u9700\u6df1\u5165\u547d\u4ee4\u884c\u64cd\u4f5c\u5373\u53ef\u5b8c\u6210\u6253\u5305\u8fc7\u7a0b\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u4f1a\u63d0\u4f9b\u5411\u5bfc\u5f0f\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u7528\u6237\u9009\u62e9\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6\u548c\u8bbe\u7f6e\u76f8\u5173\u7684\u9009\u9879\uff0c\u4f7f\u5f97\u6574\u4e2a\u8fc7\u7a0b\u66f4\u52a0\u76f4\u89c2\u6613\u61c2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06Python\u4ee3\u7801\u751f\u6210exe\u6587\u4ef6\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u3001py2exe [&hellip;]","protected":false},"author":3,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127341"}],"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=1127341"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127341\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1127341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1127341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1127341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}