{"id":952478,"date":"2024-12-27T01:31:45","date_gmt":"2024-12-26T17:31:45","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/952478.html"},"modified":"2024-12-27T01:31:47","modified_gmt":"2024-12-26T17:31:47","slug":"python-%e5%a6%82%e4%bd%95%e6%89%93%e5%8c%85-exe","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/952478.html","title":{"rendered":"python \u5982\u4f55\u6253\u5305 exe"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25090323\/ea669bc7-db73-4220-9361-79967fa43143.webp\" alt=\"python \u5982\u4f55\u6253\u5305 exe\" \/><\/p>\n<p><p> <strong>\u8981\u5c06Python\u811a\u672c\u6253\u5305\u6210\u53ef\u6267\u884c\u7684EXE\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u5e93\uff0c\u4f8b\u5982PyInstaller\u3001cx_Freeze\u3001py2exe\u7b49\u3002\u6bcf\u79cd\u5de5\u5177\u90fd\u6709\u5176\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528PyInstaller\u3001\u4f7f\u7528cx_Freeze\u3001\u4f7f\u7528py2exe\u3002\u672c\u6587\u5c06\u91cd\u70b9\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528PyInstaller\u8fdb\u884c\u6253\u5305\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528PyInstaller\u8fdb\u884c\u6253\u5305\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u4e4b\u4e00\u3002PyInstaller\u652f\u6301\u5927\u591a\u6570\u7b2c\u4e09\u65b9\u5305\uff0c\u4f7f\u7528\u7b80\u5355\uff0c\u53ea\u9700\u4e00\u884c\u547d\u4ee4\u5373\u53ef\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/strong>\u5b83\u7684\u57fa\u672c\u5de5\u4f5c\u6d41\u7a0b\u662f\u901a\u8fc7\u5206\u6790Python\u811a\u672c\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u5c06\u6240\u6709\u9700\u8981\u7684\u5e93\u548c\u8d44\u6e90\u6587\u4ef6\u6253\u5305\u5230\u4e00\u4e2a\u6587\u4ef6\u5939\u4e2d\uff0c\u6700\u7ec8\u751f\u6210\u4e00\u4e2a\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u5173\u4e8e\u5982\u4f55\u4f7f\u7528PyInstaller\u6253\u5305Python\u811a\u672c\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5PyInstaller<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528PyInstaller\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u8be5\u5de5\u5177\u3002\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u8f7b\u677e\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyinstaller<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>pyinstaller --version<\/code>\u6765\u786e\u8ba4\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u57fa\u672c\u6253\u5305\u547d\u4ee4<\/p>\n<\/p>\n<p><p>PyInstaller\u7684\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d<code>your_script.py<\/code>\u662f\u4f60\u60f3\u8981\u6253\u5305\u7684Python\u811a\u672c\u540d\u79f0\u3002\u8fd0\u884c\u8be5\u547d\u4ee4\u540e\uff0cPyInstaller\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a<code>dist<\/code>\u6587\u4ef6\u5939\uff0c\u5176\u4e2d\u5305\u542b\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p><strong>PyInstaller\u7684\u9ed8\u8ba4\u6253\u5305\u6a21\u5f0f\u662f\u751f\u6210\u4e00\u4e2a\u5305\u542b\u6240\u6709\u4f9d\u8d56\u9879\u7684\u6587\u4ef6\u5939\u3002\u5982\u679c\u60f3\u8981\u751f\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--onefile<\/code>\u9009\u9879\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u5904\u7406\u9644\u52a0\u6587\u4ef6\u548c\u8d44\u6e90<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0cPython\u811a\u672c\u53ef\u80fd\u4f9d\u8d56\u4e8e\u4e00\u4e9b\u5916\u90e8\u6587\u4ef6\uff0c\u5982\u914d\u7f6e\u6587\u4ef6\u3001\u56fe\u50cf\u6216\u5176\u4ed6\u8d44\u6e90\u3002PyInstaller\u63d0\u4f9b\u4e86\u5c06\u8fd9\u4e9b\u6587\u4ef6\u4e00\u8d77\u6253\u5305\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>--add-data<\/code>\u9009\u9879\u6765\u6dfb\u52a0\u8d44\u6e90\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u7684\u811a\u672c\u4f9d\u8d56\u4e8e\u4e00\u4e2a\u540d\u4e3a<code>config.json<\/code>\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --add-data &quot;config.json;.&quot; your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u4f7f\u7528\u5206\u53f7<code>;<\/code>\u5206\u9694\u6e90\u6587\u4ef6\u548c\u76ee\u6807\u8def\u5f84\uff0c\u5728Linux\u548cmacOS\u4e0a\u4f7f\u7528\u5192\u53f7<code>:<\/code>\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u8bbe\u7f6e\u56fe\u6807\u548c\u5176\u4ed6\u9009\u9879<\/p>\n<\/p>\n<p><p>PyInstaller\u5141\u8bb8\u8bbe\u7f6e\u53ef\u6267\u884c\u6587\u4ef6\u7684\u56fe\u6807\uff0c\u53ef\u4ee5\u901a\u8fc7<code>--icon<\/code>\u9009\u9879\u6307\u5b9a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --icon=your_icon.ico your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u5916\uff0cPyInstaller\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u9009\u9879\uff0c\u5982\u6392\u9664\u7279\u5b9a\u6a21\u5757\u3001\u8bbe\u7f6e\u8fd0\u884c\u65f6\u7684Python\u7248\u672c\u7b49\u3002\u53ef\u4ee5\u901a\u8fc7<code>pyinstaller --help<\/code>\u67e5\u770b\u6240\u6709\u53ef\u7528\u9009\u9879\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u6253\u5305\u540e\u7684\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u5982\u7f3a\u5c11\u4f9d\u8d56\u3001\u8def\u5f84\u95ee\u9898\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7f3a\u5c11\u4f9d\u8d56<\/strong>\uff1a\u5982\u679c\u6253\u5305\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u65e0\u6cd5\u8fd0\u884c\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u7f3a\u5c11\u67d0\u4e9b\u4f9d\u8d56\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u751f\u6210\u7684<code>warn-*.txt<\/code>\u6587\u4ef6\u6765\u67e5\u627e\u7f3a\u5931\u7684\u6a21\u5757\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8def\u5f84\u95ee\u9898<\/strong>\uff1a\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u811a\u672c\u4e2d\u7684\u6587\u4ef6\u8def\u5f84\u53ef\u80fd\u4f1a\u5931\u6548\u3002\u53ef\u4ee5\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u4e2d\u7684<code>sys._MEIPASS<\/code>\u6765\u83b7\u53d6\u4e34\u65f6\u8def\u5f84\uff1a<\/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><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u8bd5\u4fe1\u606f<\/strong>\uff1a\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--log-level<\/code>\u9009\u9879\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\uff0c\u4ee5\u4fbf\u83b7\u53d6\u66f4\u591a\u8c03\u8bd5\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --log-level=DEBUG your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u907f\u514d\u4e0e\u7cfb\u7edfPython\u73af\u5883\u53d1\u751f\u51b2\u7a81\uff0c\u5efa\u8bae\u5728\u865a\u62df\u73af\u5883\u4e2d\u8fdb\u884c\u6253\u5305\u3002\u53ef\u4ee5\u4f7f\u7528<code>virtualenv<\/code>\u6216<code>venv<\/code>\u6765\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u5e76\u5728\u5176\u4e2d\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u4f7f\u7528cx_Freeze\u8fdb\u884c\u6253\u5305<\/p>\n<\/p>\n<p><p>\u9664\u4e86PyInstaller\u4e4b\u5916\uff0ccx_Freeze\u4e5f\u662f\u4e00\u4e2a\u5e38\u7528\u7684\u6253\u5305\u5de5\u5177\u3002\u5b83\u7684\u4f7f\u7528\u65b9\u5f0f\u4e0ePyInstaller\u7c7b\u4f3c\uff0c\u4f46\u914d\u7f6e\u6587\u4ef6\u7a0d\u6709\u4e0d\u540c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5cx_Freeze<\/strong>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install cx_Freeze<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efasetup.py\u6587\u4ef6<\/strong>\uff1a\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\uff0c\u7528\u4e8e\u914d\u7f6e\u6253\u5305\u4fe1\u606f\u3002<\/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;your_script&quot;,<\/p>\n<p>    version=&quot;0.1&quot;,<\/p>\n<p>    description=&quot;Your script description&quot;,<\/p>\n<p>    executables=[Executable(&quot;your_script.py&quot;)],<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u6253\u5305\u547d\u4ee4<\/strong>\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\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5c06\u4f4d\u4e8e<code>build<\/code>\u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516b\u3001\u4f7f\u7528py2exe\u8fdb\u884c\u6253\u5305<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8eWindows\u5e73\u53f0\uff0cpy2exe\u662f\u4e00\u4e2a\u8f83\u65e9\u7684\u6253\u5305\u5de5\u5177\uff0c\u4e0d\u8fc7\u5b83\u7684\u4f7f\u7528\u65b9\u5f0f\u8f83\u4e3a\u590d\u6742\uff0c\u76ee\u524d\u7684\u4f7f\u7528\u7387\u8f83\u4f4e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5py2exe<\/strong>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efasetup.py\u6587\u4ef6<\/strong>\uff1a\u4e0ecx_Freeze\u7c7b\u4f3c\uff0c\u521b\u5efa<code>setup.py<\/code>\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from distutils.core import setup<\/p>\n<p>import py2exe<\/p>\n<p>setup(console=[&#39;your_script.py&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u6253\u5305\u547d\u4ee4<\/strong>\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\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5c06\u4f4d\u4e8e<code>dist<\/code>\u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e5d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u6253\u5305Python\u811a\u672c\u6210\u53ef\u6267\u884c\u6587\u4ef6\u662fPython\u5e94\u7528\u7a0b\u5e8f\u53d1\u5e03\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u5728\u9009\u62e9\u5de5\u5177\u65f6\uff0c\u5e94\u6839\u636e\u9879\u76ee\u7684\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002<strong>PyInstaller\u7531\u4e8e\u5176\u5f3a\u5927\u7684\u529f\u80fd\u548c\u7b80\u5355\u7684\u4f7f\u7528\u65b9\u5f0f\uff0c\u662f\u6253\u5305Python\u811a\u672c\u7684\u9996\u9009\u5de5\u5177<\/strong>\u3002\u540c\u65f6\uff0c\u4e86\u89e3\u5982\u4f55\u5904\u7406\u6253\u5305\u8fc7\u7a0b\u4e2d\u7684\u95ee\u9898\u4e5f\u662f\u786e\u4fdd\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u6b63\u5e38\u8fd0\u884c\u7684\u5173\u952e\u3002\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\u548c\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u7cfb\u7edf\u4e0a\u8fd0\u884c\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 \/>\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\uff0c\u6700\u5e38\u89c1\u7684\u662fPyInstaller\u3001cx_Freeze\u548cpy2exe\u3002\u4ee5PyInstaller\u4e3a\u4f8b\uff0c\u4f60\u9700\u8981\u5148\u5b89\u88c5\u5b83\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4 <code>pip install pyinstaller<\/code> \u6765\u5b8c\u6210\u3002\u5b89\u88c5\u540e\uff0c\u4f7f\u7528\u547d\u4ee4 <code>pyinstaller your_script.py<\/code>\uff0c\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u751f\u6210\u4e00\u4e2a\u5305\u542b\u53ef\u6267\u884c\u6587\u4ef6\u7684\u6587\u4ef6\u5939\u3002\u4f60\u53ef\u4ee5\u5728dist\u6587\u4ef6\u5939\u4e2d\u627e\u5230\u751f\u6210\u7684.exe\u6587\u4ef6\u3002<\/p>\n<p><strong>\u6253\u5305\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u54ea\u4e9b\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u6253\u5305Python\u811a\u672c\u65f6\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u7684\u95ee\u9898\uff0c\u5982\u7f3a\u5c11\u4f9d\u8d56\u9879\u3001\u6587\u4ef6\u8def\u5f84\u9519\u8bef\u6216\u56fe\u6807\u6587\u4ef6\u65e0\u6cd5\u52a0\u8f7d\u7b49\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff0c\u786e\u4fdd\u5728\u6253\u5305\u524d\u5c06\u6240\u6709\u4f9d\u8d56\u9879\u5b89\u88c5\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u5e76\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u5f15\u7528\u8d44\u6e90\u6587\u4ef6\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u67e5\u770bPyInstaller\u751f\u6210\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u4ee5\u4fbf\u8bc6\u522b\u548c\u89e3\u51b3\u9519\u8bef\u3002<\/p>\n<p><strong>\u751f\u6210\u7684exe\u6587\u4ef6\u5728\u5176\u4ed6\u7535\u8111\u4e0a\u80fd\u5426\u8fd0\u884c\uff1f<\/strong><br \/>\u751f\u6210\u7684.exe\u6587\u4ef6\u5728\u5176\u4ed6\u7535\u8111\u4e0a\u8fd0\u884c\u65f6\uff0c\u901a\u5e38\u9700\u8981\u786e\u4fdd\u76ee\u6807\u7535\u8111\u4e0a\u5b89\u88c5\u4e86\u76f8\u5e94\u7684\u4f9d\u8d56\u5e93\u3002\u5982\u679c\u4f7f\u7528PyInstaller\u6253\u5305\u65f6\u9009\u62e9\u4e86\u201c\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u201d\u9009\u9879\uff0c\u90a3\u4e48\u751f\u6210\u7684\u6587\u4ef6\u4f1a\u5305\u542b\u6240\u6709\u4f9d\u8d56\u9879\uff0c\u7406\u8bba\u4e0a\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u7535\u8111\u4e0a\u76f4\u63a5\u8fd0\u884c\u3002\u4e0d\u8fc7\uff0c\u6709\u4e9b\u5916\u90e8\u6587\u4ef6\uff08\u5982\u6570\u636e\u5e93\u6216\u914d\u7f6e\u6587\u4ef6\uff09\u53ef\u80fd\u9700\u8981\u624b\u52a8\u590d\u5236\u5230\u76ee\u6807\u7535\u8111\u3002\u786e\u4fdd\u6d4b\u8bd5\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u7684\u517c\u5bb9\u6027\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u987a\u5229\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06Python\u811a\u672c\u6253\u5305\u6210\u53ef\u6267\u884c\u7684EXE\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u5e93\uff0c\u4f8b\u5982PyInstaller\u3001cx_Free [&hellip;]","protected":false},"author":3,"featured_media":952482,"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\/952478"}],"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=952478"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/952478\/revisions"}],"predecessor-version":[{"id":952487,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/952478\/revisions\/952487"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/952482"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=952478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=952478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=952478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}