{"id":1002368,"date":"2024-12-27T10:08:05","date_gmt":"2024-12-27T02:08:05","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1002368.html"},"modified":"2024-12-27T10:08:07","modified_gmt":"2024-12-27T02:08:07","slug":"py%e5%a6%82%e4%bd%95%e8%84%b1%e7%a6%bbpython%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1002368.html","title":{"rendered":"py\u5982\u4f55\u8131\u79bbpython\u73af\u5883"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080143\/dfe467d5-57f1-49be-b949-a3aefbdd50c8.webp\" alt=\"py\u5982\u4f55\u8131\u79bbpython\u73af\u5883\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u82e5\u8981\u8131\u79bbPython\u73af\u5883\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u521b\u5efa\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001\u5b89\u88c5Python\u89e3\u91ca\u5668\u5230\u7cfb\u7edf\u8def\u5f84\u3002<\/strong>\u521b\u5efa\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\uff0c\u5b83\u80fd\u591f\u8ba9\u60a8\u7684Python\u7a0b\u5e8f\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u8fd9\u901a\u5e38\u901a\u8fc7\u5de5\u5177\u5982PyInstaller\u6216cx_Freeze\u5b9e\u73b0\u3002\u4ee5PyInstaller\u4e3a\u4f8b\uff0c\u5b83\u5c06Python\u811a\u672c\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u5728\u4e0d\u5b89\u88c5Python\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u3002\u4ee5\u4e0b\u662f\u5bf9\u8fd9\u79cd\u65b9\u6cd5\u7684\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/p>\n<\/p>\n<p><p>\u4f7f\u7528PyInstaller\uff0c\u60a8\u53ef\u4ee5\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5PyInstaller\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\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\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06Python\u811a\u672c\u6253\u5305\uff1a<\/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>\u5176\u4e2d\uff0c<code>--onefile<\/code>\u9009\u9879\u8868\u793a\u5c06\u6240\u6709\u6587\u4ef6\u5408\u5e76\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u6267\u884c\u4ee5\u4e0a\u547d\u4ee4\u540e\uff0cPyInstaller\u5c06\u5728<code>dist<\/code>\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u76f4\u63a5\u8fd0\u884c\u8be5\u6587\u4ef6\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001\u521b\u5efa\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u521b\u5efa\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u662f\u8131\u79bbPython\u73af\u5883\u7684\u6700\u5e38\u7528\u65b9\u6cd5\u4e4b\u4e00\u3002\u901a\u8fc7\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u6ca1\u6709\u5b89\u88c5Python\u89e3\u91ca\u5668\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u7a0b\u5e8f\u3002\u8fd9\u5bf9\u4e8e\u5206\u53d1\u5e94\u7528\u7a0b\u5e8f\u548c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u4fbf\u643a\u6027\u5c24\u4e3a\u91cd\u8981\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528PyInstaller<\/strong><\/p>\n<\/p>\n<p><p>PyInstaller\u662f\u4e00\u6b3e\u5e7f\u6cdb\u4f7f\u7528\u7684\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002PyInstaller\u652f\u6301\u591a\u4e2a\u5e73\u53f0\uff0c\u5305\u62ecWindows\u3001Linux\u548cmacOS\u3002\u4f7f\u7528PyInstaller\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5PyInstaller<\/strong>\uff1a\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86PyInstaller\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\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<\/li>\n<li>\n<p><strong>\u6253\u5305Python\u811a\u672c<\/strong>\uff1a\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528PyInstaller\u5c06Python\u811a\u672c\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u57fa\u672c\u7684\u547d\u4ee4\u683c\u5f0f\uff1a<\/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>\u5176\u4e2d\uff0c<code>--onefile<\/code>\u9009\u9879\u8868\u793a\u5c06\u6240\u6709\u6587\u4ef6\u5408\u5e76\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u68c0\u67e5\u8f93\u51fa<\/strong>\uff1aPyInstaller\u5728<code>dist<\/code>\u76ee\u5f55\u4e0b\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ef\u4ee5\u5728\u6ca1\u6709Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5c06\u8be5\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u673a\u5668\u4e0a\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528cx_Freeze<\/strong><\/p>\n<\/p>\n<p><p>cx_Freeze\u662f\u53e6\u4e00\u79cd\u7528\u4e8e\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5de5\u5177\u3002\u5b83\u652f\u6301Windows\u548cLinux\u5e73\u53f0\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528cx_Freeze\u7684\u57fa\u672c\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5cx_Freeze<\/strong>\uff1a\u9996\u5148\u5b89\u88c5cx_Freeze\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\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<\/li>\n<li>\n<p><strong>\u7f16\u5199setup\u811a\u672c<\/strong>\uff1a\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\uff0c\u7528\u4e8e\u914d\u7f6e\u6253\u5305\u9009\u9879\u3002\u4f8b\u5982\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;your_app_name&quot;,<\/p>\n<p>    version=&quot;0.1&quot;,<\/p>\n<p>    description=&quot;Your application 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>\u6253\u5305\u5e94\u7528\u7a0b\u5e8f<\/strong>\uff1a\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u53ef\u6267\u884c\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<\/li>\n<\/ul>\n<p><p>cx_Freeze\u5c06\u5728<code>build<\/code>\u76ee\u5f55\u4e0b\u751f\u6210\u6240\u9700\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u865a\u62df\u73af\u5883\u662f\u4e00\u79cd\u5728\u540c\u4e00\u7cfb\u7edf\u4e0a\u9694\u79bb\u591a\u4e2aPython\u9879\u76ee\u7684\u65b9\u6cd5\u3002\u8fd9\u4f7f\u5f97\u6bcf\u4e2a\u9879\u76ee\u53ef\u4ee5\u6709\u81ea\u5df1\u7684\u4f9d\u8d56\u5305\u7248\u672c\uff0c\u800c\u4e0d\u4f1a\u4e92\u76f8\u5e72\u6270\u3002\u867d\u7136\u865a\u62df\u73af\u5883\u672c\u8d28\u4e0a\u4ecd\u7136\u4f9d\u8d56\u4e8ePython\uff0c\u4f46\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u7075\u6d3b\u7684<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/23316.html\" target=\"_blank\">\u9879\u76ee\u7ba1\u7406<\/a>\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>venv<\/code>\u6a21\u5757\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u865a\u62df\u73af\u5883\u3002\u4ee5\u4e0b\u662f\u57fa\u672c\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong>\uff1a\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv env<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>env<\/code>\u7684\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong>\uff1a\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u3002\u5728Windows\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\\env\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source env\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7ba1\u7406\u4f9d\u8d56\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6240\u6709\u5b89\u88c5\u7684\u5305\u90fd\u5c06\u4fdd\u5b58\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5168\u5c40Python\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9000\u51fa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u5b8c\u6210\u5de5\u4f5c\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u5b89\u88c5Python\u89e3\u91ca\u5668\u5230\u7cfb\u7edf\u8def\u5f84<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u5c06Python\u89e3\u91ca\u5668\u76f4\u63a5\u5b89\u88c5\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u4ee5\u4fbf\u5728\u4efb\u4f55\u5730\u65b9\u90fd\u80fd\u8f7b\u677e\u8fd0\u884cPython\u811a\u672c\u3002\u867d\u7136\u8fd9\u5e76\u4e0d\u662f\u771f\u6b63\u7684\u201c\u8131\u79bb\u201dPython\u73af\u5883\uff0c\u4f46\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5316\u7684\u4f7f\u7528\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong><\/p>\n<\/p>\n<p><p>\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbfPython\u89e3\u91ca\u5668\u88ab\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u9a8c\u8bc1Python\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5e94\u8be5\u663e\u793a\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython\u811a\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u65e6Python\u88ab\u6b63\u786e\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u76f4\u63a5\u8fd0\u884cPython\u811a\u672c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python your_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u5728\u4e0d\u540c\u7a0b\u5ea6\u4e0a\u5b9e\u73b0Python\u73af\u5883\u7684\u201c\u8131\u79bb\u201d\u6216\u7b80\u5316\u4f7f\u7528\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u4ee5\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u4fbf\u643a\u6027\u548c\u53ef\u7528\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u4e0d\u5f71\u54cd\u5176\u4ed6\u9879\u76ee\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528py\uff1f<\/strong><br \/>\u5728\u4f7f\u7528py\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u865a\u62df\u73af\u5883\u6765\u786e\u4fdd\u6bcf\u4e2a\u9879\u76ee\u90fd\u5728\u72ec\u7acb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u8fd9\u53ef\u4ee5\u4f7f\u7528venv\u6216conda\u7b49\u5de5\u5177\u5b9e\u73b0\u3002\u521b\u5efa\u865a\u62df\u73af\u5883\u540e\uff0c\u6fc0\u6d3b\u5b83\uff0c\u5e76\u5728\u5176\u4e2d\u5b89\u88c5\u6240\u9700\u7684\u5e93\u548c\u4f9d\u8d56\u9879\uff0c\u786e\u4fdd\u4e0d\u4f1a\u5e72\u6270\u5230\u7cfb\u7edf\u7684Python\u73af\u5883\u6216\u5176\u4ed6\u9879\u76ee\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u7ba1\u7406Python\u73af\u5883\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u6765\u7ba1\u7406Python\u73af\u5883\uff0c\u4f8b\u5982virtualenv\u3001pipenv\u548cconda\u3002\u8fd9\u4e9b\u5de5\u5177\u5141\u8bb8\u7528\u6237\u521b\u5efa\u3001\u5220\u9664\u548c\u5207\u6362\u4e0d\u540c\u7684\u73af\u5883\uff0c\u4ece\u800c\u5728\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u9694\u79bb\u4f9d\u8d56\u3002\u6839\u636e\u9879\u76ee\u7684\u9700\u6c42\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u9002\u5408\u81ea\u5df1\u7684\u5de5\u5177\u8fdb\u884c\u73af\u5883\u7ba1\u7406\u3002<\/p>\n<p><strong>\u5982\u679c\u6211\u60f3\u5728\u4e0d\u540c\u7248\u672c\u7684Python\u4e4b\u95f4\u5207\u6362\uff0c\u8be5\u600e\u4e48\u505a\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528pyenv\u6765\u8f7b\u677e\u7ba1\u7406\u548c\u5207\u6362\u4e0d\u540c\u7248\u672c\u7684Python\u3002\u901a\u8fc7pyenv\uff0c\u7528\u6237\u53ef\u4ee5\u5b89\u88c5\u591a\u79cdPython\u7248\u672c\uff0c\u5e76\u4e14\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u9879\u76ee\u8bbe\u7f6e\u6307\u5b9a\u7684Python\u7248\u672c\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u6bcf\u4e2a\u9879\u76ee\u90fd\u4f7f\u7528\u9002\u5408\u5176\u9700\u6c42\u7684Python\u7248\u672c\uff0c\u800c\u4e0d\u4f1a\u9020\u6210\u7248\u672c\u51b2\u7a81\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u82e5\u8981\u8131\u79bbPython\u73af\u5883\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u521b\u5efa\u72ec\u7acb\u53ef\u6267\u884c\u6587\u4ef6\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001\u5b89\u88c5Pytho [&hellip;]","protected":false},"author":3,"featured_media":1002374,"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\/1002368"}],"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=1002368"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1002368\/revisions"}],"predecessor-version":[{"id":1002376,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1002368\/revisions\/1002376"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1002374"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1002368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1002368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1002368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}