{"id":1153227,"date":"2025-01-13T17:36:07","date_gmt":"2025-01-13T09:36:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1153227.html"},"modified":"2025-01-13T17:36:10","modified_gmt":"2025-01-13T09:36:10","slug":"python%e7%a8%8b%e5%ba%8f%e6%ba%90%e7%a0%81%e5%a6%82%e4%bd%95%e6%89%93%e5%8c%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1153227.html","title":{"rendered":"python\u7a0b\u5e8f\u6e90\u7801\u5982\u4f55\u6253\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25183035\/36e936cb-eb0e-440a-a316-9f4cd855b7ea.webp\" alt=\"python\u7a0b\u5e8f\u6e90\u7801\u5982\u4f55\u6253\u5305\" \/><\/p>\n<p><p> \u8981\u5c06Python\u7a0b\u5e8f\u6e90\u7801\u6253\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5982<strong>PyInstaller\u3001cx_Freeze\u3001py2exe<\/strong>\u7b49\u3002<strong>PyInstaller<\/strong>\u662f\u4e00\u79cd\u6bd4\u8f83\u6d41\u884c\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u9879\u6253\u5305\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<strong>PyInstaller\u652f\u6301\u591a\u5e73\u53f0\u3001\u6613\u4e8e\u914d\u7f6e\u3001\u751f\u6210\u5355\u4e2a\u6587\u4ef6<\/strong>\uff0c\u8fd9\u4f7f\u5f97\u5b83\u6210\u4e3a\u5f00\u53d1\u4eba\u5458\u7684\u9996\u9009\u4e4b\u4e00\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528PyInstaller\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u53ef\u6267\u884c\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\u4f60\u9700\u8981\u5728\u4f60\u7684Python\u73af\u5883\u4e2d\u5b89\u88c5PyInstaller\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528pip\u8fdb\u884c\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><h3>\u4e8c\u3001\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1\u3001\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>hello.py<\/code>\u7684\u7b80\u5355Python\u811a\u672c\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><h4>2\u3001\u4f7f\u7528PyInstaller\u6253\u5305<\/h4>\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\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u751f\u6210\u4e00\u4e2a<code>dist<\/code>\u6587\u4ef6\u5939\uff0c\u5176\u4e2d\u5305\u542b\u6253\u5305\u597d\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u9ad8\u7ea7\u914d\u7f6e<\/h3>\n<\/p>\n<p><h4>1\u3001\u751f\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPyInstaller\u4f1a\u751f\u6210\u591a\u4e2a\u6587\u4ef6\u3002\u5982\u679c\u4f60\u5e0c\u671b\u751f\u6210\u4e00\u4e2a\u5355\u72ec\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>--onefile<\/code>\u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile 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\u4f60\u4e0d\u5e0c\u671b\u5728\u6267\u884c\u53ef\u6267\u884c\u6587\u4ef6\u65f6\u51fa\u73b0\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\u56fe\u6807<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528<code>--icon<\/code>\u9009\u9879\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u6dfb\u52a0\u56fe\u6807\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --noconsole --icon=myicon.ico hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6253\u5305\u590d\u6742\u9879\u76ee<\/h3>\n<\/p>\n<p><h4>1\u3001\u6253\u5305\u5305\u542b\u591a\u4e2a\u6a21\u5757\u7684\u9879\u76ee<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5305\u542b\u591a\u4e2a\u6a21\u5757\u548c\u4f9d\u8d56\u9879\u7684\u9879\u76ee\uff0cPyInstaller\u540c\u6837\u53ef\u4ee5\u5904\u7406\u3002\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u590d\u6742\u7684\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code>my_project\/<\/p>\n<p>    m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n.py<\/p>\n<p>    module1.py<\/p>\n<p>    module2.py<\/p>\n<p>    data\/<\/p>\n<p>        datafile.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230<code>my_project<\/code>\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>PyInstaller\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5e76\u6253\u5305\u6240\u6709\u76f8\u5173\u6a21\u5757\u548c\u4f9d\u8d56\u9879\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528.spec\u6587\u4ef6\u8fdb\u884c\u81ea\u5b9a\u4e49\u914d\u7f6e<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u9879\u76ee\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528.spec\u6587\u4ef6\u8fdb\u884c\u81ea\u5b9a\u4e49\u914d\u7f6e\u3002\u9996\u5148\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210.spec\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --noconsole --icon=myicon.ico --name=my_executable main.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u4e00\u4e2a<code>main.spec<\/code>\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u6253\u5f00\u5e76\u7f16\u8f91\u6b64\u6587\u4ef6\uff0c\u4ee5\u4fbf\u8fdb\u884c\u66f4\u8be6\u7ec6\u7684\u914d\u7f6e\uff0c\u4f8b\u5982\u6dfb\u52a0\u6570\u636e\u6587\u4ef6\u3001\u4fee\u6539\u8def\u5f84\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># -*- mode: python ; coding: utf-8 -*-<\/p>\n<p>block_cipher = None<\/p>\n<p>a = Analysis(<\/p>\n<p>    [&#39;main.py&#39;],<\/p>\n<p>    pathex=[&#39;\/path\/to\/my_project&#39;],<\/p>\n<p>    binaries=[],<\/p>\n<p>    datas=[(&#39;data\/datafile.txt&#39;, &#39;data&#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>)<\/p>\n<p>pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)<\/p>\n<p>exe = EXE(<\/p>\n<p>    pyz,<\/p>\n<p>    a.scripts,<\/p>\n<p>    [],<\/p>\n<p>    exclude_binaries=True,<\/p>\n<p>    name=&#39;my_executable&#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=False,<\/p>\n<p>    icon=&#39;myicon.ico&#39;,<\/p>\n<p>)<\/p>\n<p>coll = COLLECT(<\/p>\n<p>    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;my_executable&#39;,<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u4f7f\u7528.spec\u6587\u4ef6\u8fdb\u884c\u6253\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller main.spec<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5176\u4ed6\u6253\u5305\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>1\u3001cx_Freeze<\/h4>\n<\/p>\n<p><p>cx_Freeze\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u6253\u5305\u5de5\u5177\uff0c\u7279\u522b\u9002\u7528\u4e8e\u9700\u8981\u8de8\u5e73\u53f0\u6253\u5305\u7684\u9879\u76ee\u3002\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\u8fdb\u884c\u914d\u7f6e\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;My Hello World App&quot;,<\/p>\n<p>    executables=[Executable(&quot;hello.py&quot;)],<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\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><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\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\u8fdb\u884c\u914d\u7f6e\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(console=[&#39;hello.py&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\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 py2exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1\u3001\u7f3a\u5c11\u4f9d\u8d56\u9879<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0cPyInstaller\u53ef\u80fd\u65e0\u6cd5\u81ea\u52a8\u68c0\u6d4b\u67d0\u4e9b\u4f9d\u8d56\u9879\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>--hidden-import<\/code>\u9009\u9879\u624b\u52a8\u6307\u5b9a\u8fd9\u4e9b\u4f9d\u8d56\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile --hidden-import=missing_module hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8def\u5f84\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u7684\u9879\u76ee\u4e2d\u5305\u542b\u76f8\u5bf9\u8def\u5f84\u8d44\u6e90\uff0c\u6253\u5305\u540e\u53ef\u80fd\u4f1a\u51fa\u73b0\u8def\u5f84\u95ee\u9898\u3002\u4f60\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528<code>sys._MEIPASS<\/code>\u6765\u83b7\u53d6\u6253\u5305\u540e\u7684\u4e34\u65f6\u76ee\u5f55\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>import os<\/p>\n<p>if getattr(sys, &#39;frozen&#39;, False):<\/p>\n<p>    base_path = sys._MEIPASS<\/p>\n<p>else:<\/p>\n<p>    base_path = os.path.abspath(&quot;.&quot;)<\/p>\n<p>data_file_path = os.path.join(base_path, &quot;data&quot;, &quot;datafile.txt&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5c06Python\u7a0b\u5e8f\u6e90\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u662f\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u6280\u80fd\uff0c\u5b83\u53ef\u4ee5\u8ba9\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u66f4\u52a0\u4fbf\u4e8e\u5206\u53d1\u548c\u90e8\u7f72\u3002<strong>PyInstaller\u3001cx_Freeze\u548cpy2exe<\/strong>\u7b49\u5de5\u5177\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u7075\u6d3b\u7684\u914d\u7f6e\u9009\u9879\uff0c\u53ef\u4ee5\u6ee1\u8db3\u4e0d\u540c\u9879\u76ee\u7684\u9700\u6c42\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u4f60\u5e94\u8be5\u5df2\u7ecf\u638c\u63e1\u4e86\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u8fdb\u884c\u57fa\u672c\u548c\u9ad8\u7ea7\u6253\u5305\u64cd\u4f5c\uff0c\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u5e38\u89c1\u7684\u95ee\u9898\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5bf9\u4f60\u7684\u5f00\u53d1\u5de5\u4f5c\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u7a0b\u5e8f\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff1f<\/strong><br \/>Python\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u662fPyInstaller\u3001cx_Freeze\u548cpy2exe\u3002PyInstaller\u662f\u4e00\u4e2a\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u9879\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u652f\u6301Windows\u3001macOS\u548cLinux\u7cfb\u7edf\u3002\u4f7f\u7528\u65f6\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u884c\u8f93\u5165<code>pyinstaller your_script.py<\/code>\uff0c\u751f\u6210\u7684\u6587\u4ef6\u4f1a\u5728<code>dist<\/code>\u76ee\u5f55\u4e0b\u3002<\/p>\n<p><strong>\u6253\u5305Python\u7a0b\u5e8f\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u6253\u5305Python\u7a0b\u5e8f\u65f6\uff0c\u786e\u4fdd\u6240\u6709\u4f9d\u8d56\u5e93\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u5e76\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u597d\u76f8\u5173\u53c2\u6570\u3002\u4f8b\u5982\uff0c\u4f7f\u7528PyInstaller\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>--onefile<\/code>\u9009\u9879\u751f\u6210\u5355\u4e00\u6587\u4ef6\uff0c\u6216\u901a\u8fc7<code>--add-data<\/code>\u9009\u9879\u6dfb\u52a0\u989d\u5916\u8d44\u6e90\uff08\u5982\u56fe\u7247\u3001\u6570\u636e\u6587\u4ef6\u7b49\uff09\u3002\u6b64\u5916\uff0c\u68c0\u67e5\u662f\u5426\u9700\u8981\u6307\u5b9a\u7279\u5b9a\u7684Python\u89e3\u91ca\u5668\u7248\u672c\uff0c\u4ee5\u907f\u514d\u517c\u5bb9\u6027\u95ee\u9898\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f18\u5316\u6253\u5305\u540e\u7684Python\u7a0b\u5e8f\u7684\u6027\u80fd\uff1f<\/strong><br \/>\u6253\u5305\u540e\u7684Python\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u56e0\u4e3a\u5305\u542b\u5927\u91cf\u4f9d\u8d56\u9879\u800c\u663e\u5f97\u8f83\u5927\u548c\u8f83\u6162\u3002\u4f18\u5316\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528<code>--exclude-module<\/code>\u9009\u9879\u6392\u9664\u4e0d\u5fc5\u8981\u7684\u6a21\u5757\uff0c\u6216\u8005\u5229\u7528<code>UPX<\/code>\u5bf9\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u8fdb\u884c\u538b\u7f29\u3002\u6b64\u5916\uff0c\u5408\u7406\u7ec4\u7ec7\u4ee3\u7801\u7ed3\u6784\uff0c\u5c3d\u91cf\u51cf\u5c11\u5197\u4f59\u4f9d\u8d56\uff0c\u4e5f\u4f1a\u6709\u52a9\u4e8e\u63d0\u5347\u6027\u80fd\u548c\u51cf\u5c0f\u6587\u4ef6\u4f53\u79ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06Python\u7a0b\u5e8f\u6e90\u7801\u6253\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5982PyInstaller\u3001cx_Freeze\u3001py2ex [&hellip;]","protected":false},"author":3,"featured_media":1153228,"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\/1153227"}],"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=1153227"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1153227\/revisions"}],"predecessor-version":[{"id":1153231,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1153227\/revisions\/1153231"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1153228"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1153227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1153227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1153227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}