{"id":1181680,"date":"2025-01-15T18:54:42","date_gmt":"2025-01-15T10:54:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1181680.html"},"modified":"2025-01-15T18:54:44","modified_gmt":"2025-01-15T10:54:44","slug":"%e5%a6%82%e4%bd%95%e8%ae%a9python%e4%bb%a3%e7%a0%81%e4%bf%9d%e5%ad%98exe","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1181680.html","title":{"rendered":"\u5982\u4f55\u8ba9python\u4ee3\u7801\u4fdd\u5b58exe"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25125931\/994d0fd3-d6ae-46fb-b99c-f86950391ccc.webp\" alt=\"\u5982\u4f55\u8ba9python\u4ee3\u7801\u4fdd\u5b58exe\" \/><\/p>\n<p><p> \u8981\u5c06Python\u4ee3\u7801\u4fdd\u5b58\u4e3aexe\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002<strong>\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528PyInstaller\u3001cx_Freeze\u3001Py2exe\u548cPy2app<\/strong>\u3002\u5176\u4e2d\uff0c<strong>PyInstaller \u662f\u6700\u53d7\u6b22\u8fce\u548c\u5e7f\u6cdb\u4f7f\u7528\u7684\u5de5\u5177<\/strong>\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528PyInstaller\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5PyInstaller<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5PyInstaller\u3002\u53ef\u4ee5\u4f7f\u7528pip\u6765\u5b89\u88c5\u5b83\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\u521b\u5efa\u4e00\u4e2aPython\u811a\u672c<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\uff0c\u4f8b\u5982<code>hello.py<\/code>\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528PyInstaller\u751f\u6210exe\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efaexe\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>--onefile<\/code>\u9009\u9879\u8868\u793a\u5c06\u6240\u6709\u7684\u4ee3\u7801\u548c\u4f9d\u8d56\u6253\u5305\u6210\u4e00\u4e2a\u5355\u72ec\u7684exe\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u67e5\u770b\u751f\u6210\u7684\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>PyInstaller\u4f1a\u751f\u6210\u4e00\u4e2a<code>dist<\/code>\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u751f\u6210\u7684exe\u6587\u4ef6\u3002\u60a8\u53ef\u4ee5\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e2d\u627e\u5230<code>hello.exe<\/code>\uff0c\u5e76\u53cc\u51fb\u8fd0\u884c\u5b83\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8be6\u7ec6\u89e3\u8bf4PyInstaller\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p><strong>PyInstaller\u6709\u8bb8\u591a\u9009\u9879\uff0c\u53ef\u4ee5\u7528\u6765\u5b9a\u5236\u6253\u5305\u8fc7\u7a0b<\/strong>\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u9009\u9879\u7684\u89e3\u91ca\u548c\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u6307\u5b9a\u56fe\u6807\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>--icon<\/code>\u9009\u9879\u6765\u6307\u5b9aexe\u6587\u4ef6\u7684\u56fe\u6807\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --icon=youricon.ico hello.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\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u662fGUI\u5e94\u7528\u7a0b\u5e8f\uff0c\u800c\u4e0d\u9700\u8981\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 hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6dfb\u52a0\u6570\u636e\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u7684\u7a0b\u5e8f\u9700\u8981\u4e00\u4e9b\u989d\u5916\u7684\u6570\u636e\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--add-data<\/code>\u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --add-data &#39;data.txt;.&#39; hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u6570\u636e\u6587\u4ef6\u548c\u76ee\u6807\u76ee\u5f55\u4e4b\u95f4\u7528\u5206\u53f7\u9694\u5f00\uff1b\u5728Linux\u548cmacOS\u4e0a\uff0c\u7528\u5192\u53f7\u9694\u5f00\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u4f9d\u8d56\u9879<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0cPyInstaller\u53ef\u80fd\u65e0\u6cd5\u81ea\u52a8\u68c0\u6d4b\u5230\u6240\u6709\u7684\u4f9d\u8d56\u9879\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u4e00\u4e2a<code>spec<\/code>\u6587\u4ef6\u6765\u624b\u52a8\u6307\u5b9a\u8fd9\u4e9b\u4f9d\u8d56\u9879\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684spec\u6587\u4ef6\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># hello.spec<\/p>\n<h2><strong>-*- mode: python -*-<\/strong><\/h2>\n<p>block_cipher = None<\/p>\n<p>a = Analysis([&#39;hello.py&#39;],<\/p>\n<p>             pathex=[&#39;\/path\/to\/your\/script&#39;],<\/p>\n<p>             binaries=[],<\/p>\n<p>             datas=[(&#39;data.txt&#39;, &#39;.&#39;)],<\/p>\n<p>             hiddenimports=[],<\/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>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;hello&#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>          upx_exclude=[],<\/p>\n<p>          runtime_tmpdir=None,<\/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;hello&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528spec\u6587\u4ef6\u6253\u5305\u65f6\uff0c\u9700\u8981\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller hello.spec<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528PyInstaller\u65f6\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u7f3a\u5c11\u6a21\u5757<\/h4>\n<\/p>\n<p><p>\u5982\u679cexe\u6587\u4ef6\u5728\u8fd0\u884c\u65f6\u63d0\u793a\u7f3a\u5c11\u67d0\u4e9b\u6a21\u5757\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5728spec\u6587\u4ef6\u4e2d\u7684<code>hiddenimports<\/code>\u5217\u8868\u4e2d\u624b\u52a8\u6dfb\u52a0\u8fd9\u4e9b\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8def\u5f84\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u7684\u811a\u672c\u4e2d\u4f7f\u7528\u4e86\u76f8\u5bf9\u8def\u5f84\uff0cexe\u6587\u4ef6\u5728\u8fd0\u884c\u65f6\u53ef\u80fd\u4f1a\u627e\u4e0d\u5230\u8fd9\u4e9b\u8def\u5f84\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528<code>sys._MEIPASS<\/code>\u6765\u83b7\u53d6exe\u6587\u4ef6\u8fd0\u884c\u65f6\u7684\u4e34\u65f6\u76ee\u5f55\uff0c\u5e76\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u6765\u8bbf\u95ee\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>import os<\/p>\n<p>if hasattr(sys, &#39;_MEIPASS&#39;):<\/p>\n<p>    base_path = sys._MEIPASS<\/p>\n<p>else:<\/p>\n<p>    base_path = os.path.abspath(&quot;.&quot;)<\/p>\n<p>file_path = os.path.join(base_path, &#39;data.txt&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5176\u4ed6\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u9664\u4e86PyInstaller\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u5de5\u5177\u53ef\u4ee5\u7528\u6765\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>1\u3001cx_Freeze<\/h4>\n<\/p>\n<p><p>cx_Freeze\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528cx_Freeze\u7684\u7b80\u5355\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5cx_Freeze\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>\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from cx_Freeze import setup, Executable<\/p>\n<p>setup(<\/p>\n<p>    name = &quot;hello&quot;,<\/p>\n<p>    version = &quot;0.1&quot;,<\/p>\n<p>    description = &quot;Hello World Application&quot;,<\/p>\n<p>    executables = [Executable(&quot;hello.py&quot;, base=&quot;Win32GUI&quot;)]<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u751f\u6210exe\u6587\u4ef6\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\u3001Py2exe<\/h4>\n<\/p>\n<p><p>Py2exe\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3aWindows\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Py2exe\u7684\u7b80\u5355\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Py2exe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from distutils.core import setup<\/p>\n<p>import py2exe<\/p>\n<p>setup(<\/p>\n<p>    console=[&#39;hello.py&#39;]<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u751f\u6210exe\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001Py2app<\/h4>\n<\/p>\n<p><p>Py2app\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3amacOS\u5e94\u7528\u7a0b\u5e8f\u7684\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Py2app\u7684\u7b80\u5355\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Py2app\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install py2app<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from setuptools import setup<\/p>\n<p>APP = [&#39;hello.py&#39;]<\/p>\n<p>OPTIONS = {<\/p>\n<p>    &#39;argv_emulation&#39;: True,<\/p>\n<p>}<\/p>\n<p>setup(<\/p>\n<p>    app=APP,<\/p>\n<p>    options={&#39;py2app&#39;: OPTIONS},<\/p>\n<p>    setup_requires=[&#39;py2app&#39;],<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u751f\u6210macOS\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py py2app<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u7684\u8fc7\u7a0b\u5e76\u4e0d\u590d\u6742\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u4e00\u4e9b\u7ec6\u8282<\/strong>\u3002\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u3001\u6b63\u786e\u914d\u7f6e\u4f9d\u8d56\u9879\u548c\u8def\u5f84\uff0c\u53ef\u4ee5\u786e\u4fdd\u751f\u6210\u7684exe\u6587\u4ef6\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u4f7f\u7528PyInstaller\u3001cx_Freeze\u3001Py2exe\u548cPy2app\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5173\u7684\u914d\u7f6e\u548c\u89e3\u51b3\u65b9\u6848\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u60a8\u987a\u5229\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff1f<\/strong><br \/>\u8981\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\uff0c\u5982PyInstaller\u3001cx_Freeze\u6216py2exe\u3002\u8fd9\u4e9b\u5de5\u5177\u80fd\u591f\u5c06Python\u811a\u672c\u53ca\u5176\u4f9d\u8d56\u9879\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u65f6\uff0c\u901a\u5e38\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u7b80\u5355\u7684\u547d\u4ee4\uff0c\u5de5\u5177\u4f1a\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u9879\u5e76\u751f\u6210exe\u6587\u4ef6\u3002<\/p>\n<p><strong>\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4f9d\u8d56\u9879\uff1f<\/strong><br \/>\u5728\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u65f6\uff0c\u786e\u4fdd\u6240\u6709\u4f9d\u8d56\u5e93\u90fd\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u517c\u5bb9\u3002\u67d0\u4e9b\u5e93\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u914d\u7f6e\u6216\u8bbe\u7f6e\uff0c\u4ee5\u786e\u4fdd\u5b83\u4eec\u5728\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u6b63\u5e38\u8fd0\u884c\u3002\u5efa\u8bae\u5728\u8f6c\u6362\u524d\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\uff0c\u786e\u4fdd\u6240\u6709\u529f\u80fd\u90fd\u80fd\u5728exe\u6587\u4ef6\u4e2d\u6b63\u5e38\u4f7f\u7528\u3002<\/p>\n<p><strong>\u751f\u6210\u7684exe\u6587\u4ef6\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u5417\uff1f<\/strong><br \/>\u751f\u6210\u7684exe\u6587\u4ef6\u901a\u5e38\u53ea\u80fd\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002\u5982\u679c\u5e0c\u671b\u5728\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\uff08\u5982macOS\u6216Linux\uff09\u4e0a\u4f7f\u7528\uff0c\u9700\u8981\u5206\u522b\u5728\u8fd9\u4e9b\u7cfb\u7edf\u4e0a\u8fd0\u884c\u8f6c\u6362\u5de5\u5177\uff0c\u751f\u6210\u76f8\u5e94\u683c\u5f0f\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u6bcf\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f\u4e0d\u540c\uff0c\u56e0\u6b64\u5728\u8f6c\u6362\u65f6\u9700\u8981\u6ce8\u610f\u76ee\u6807\u5e73\u53f0\u7684\u517c\u5bb9\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06Python\u4ee3\u7801\u4fdd\u5b58\u4e3aexe\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528PyInstaller\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1181684,"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\/1181680"}],"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=1181680"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1181680\/revisions"}],"predecessor-version":[{"id":1181687,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1181680\/revisions\/1181687"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1181684"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1181680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1181680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1181680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}