{"id":1019159,"date":"2024-12-27T12:52:00","date_gmt":"2024-12-27T04:52:00","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1019159.html"},"modified":"2024-12-27T12:52:25","modified_gmt":"2024-12-27T04:52:25","slug":"%e6%a0%91%e8%8e%93%e6%b4%be%e5%a6%82%e4%bd%95%e7%bc%96%e8%af%91python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1019159.html","title":{"rendered":"\u6811\u8393\u6d3e\u5982\u4f55\u7f16\u8bd1Python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25161720\/d74d6956-3fc2-4e6a-a330-7b0d86d014e6.webp\" alt=\"\u6811\u8393\u6d3e\u5982\u4f55\u7f16\u8bd1Python\" \/><\/p>\n<p><p> \u6811\u8393\u6d3e\u7f16\u8bd1Python\u7684\u6b65\u9aa4\u5305\u62ec<strong>\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u3001\u4e0b\u8f7dPython\u6e90\u4ee3\u7801\u3001\u914d\u7f6e\u548c\u7f16\u8bd1\u6e90\u4ee3\u7801\u3001\u5b89\u88c5Python<\/strong>\u3002\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u662f\u4e3a\u4e86\u786e\u4fdd\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u7f3a\u5c11\u4efb\u4f55\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002\u4e0b\u8f7dPython\u6e90\u4ee3\u7801\u662f\u4e3a\u4e86\u83b7\u53d6\u6700\u65b0\u6216\u7279\u5b9a\u7248\u672c\u7684Python\u3002\u914d\u7f6e\u548c\u7f16\u8bd1\u6e90\u4ee3\u7801\u662f\u4e3a\u4e86\u751f\u6210\u53ef\u4ee5\u5728\u6811\u8393\u6d3e\u4e0a\u8fd0\u884c\u7684Python\u89e3\u91ca\u5668\u3002\u6700\u540e\uff0c\u5b89\u88c5Python\u662f\u4e3a\u4e86\u5c06\u7f16\u8bd1\u5b8c\u6210\u7684Python\u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u4ee5\u4f9b\u4f7f\u7528\u3002\u5728\u8fd9\u4e9b\u6b65\u9aa4\u4e2d\uff0c\u786e\u4fdd\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u662f\u6700\u4e3a\u5173\u952e\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u7f3a\u5c11\u4f9d\u8d56\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7f16\u8bd1\u5931\u8d25\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7f16\u8bd1Python\u4e4b\u524d\uff0c\u9700\u8981\u786e\u4fdd\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u4e86\u6240\u6709\u5fc5\u9700\u7684\u5de5\u5177\u548c\u5e93\u3002\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7edf\u5e76\u5b89\u88c5\u5fc5\u8981\u7684\u5f00\u53d1\u5de5\u5177\u548c\u5e93\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p>sudo apt upgrade<\/p>\n<p>sudo apt install -y build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \\<\/p>\n<p>libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev \\<\/p>\n<p>liblzma-dev tk-dev libffi-dev<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e9b\u547d\u4ee4\u4f1a\u5b89\u88c5\u7f16\u8bd1Python\u6240\u9700\u7684\u5de5\u5177\u548c\u5e93\uff0c\u5305\u62ec\u7f16\u8bd1\u5668\u3001\u538b\u7f29\u5e93\u3001\u6570\u636e\u5e93\u63a5\u53e3\u5e93\u548c\u56fe\u5f62\u754c\u9762\u5e93\u7b49\u3002\u5b89\u88c5\u8fd9\u4e9b\u4f9d\u8d56\u786e\u4fdd\u4e86\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u51fa\u73b0\u7f3a\u5c11\u5e93\u6587\u4ef6\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e0b\u8f7dPython\u6e90\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u5b8c\u4f9d\u8d56\u540e\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u4e0b\u8f7dPython\u7684\u6e90\u4ee3\u7801\u3002\u53ef\u4ee5\u4ecePython\u7684\u5b98\u65b9\u7f51\u7ad9\u6216\u8005\u901a\u8fc7GitHub\u83b7\u53d6\u6e90\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u8bbf\u95ee<a href=\"https:\/\/www.python.org\/\">Python\u5b98\u65b9\u7f51\u7ad9<\/a>\u4e0b\u8f7d\u4f60\u9700\u8981\u7684Python\u7248\u672c\u7684\u6e90\u4ee3\u7801\u3002\u9009\u62e9\u201cDownloads\u201d\u9875\u9762\uff0c\u7136\u540e\u70b9\u51fb\u201cSource code\u201d\u4e0b\u8f7d\u4f60\u9700\u8981\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u901a\u8fc7GitHub\u4e0b\u8f7d\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u9700\u8981\u514b\u9686\u6700\u65b0\u7684\u5f00\u53d1\u7248\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528Git\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git clone https:\/\/github.com\/python\/cpython.git<\/p>\n<p>cd cpython<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528\u7279\u5b9a\u7684\u7248\u672c\u53f7\u6765\u68c0\u51fa\u6240\u9700\u7684\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git checkout tags\/v3.x.x<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u7684\u9700\u6c42\u4ee5\u53ca\u6240\u652f\u6301\u7684\u529f\u80fd\u6765\u51b3\u5b9a\u3002\u901a\u5e38\uff0c\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u5305\u542b\u4e86\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u8865\u4e01\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u914d\u7f6e\u548c\u7f16\u8bd1\u6e90\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5728\u4e0b\u8f7d\u5b8c\u6e90\u4ee3\u7801\u540e\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u914d\u7f6e\u548c\u7f16\u8bd1\u5b83\u3002\u8fd9\u4e00\u6b65\u662f\u4e3a\u4e86\u751f\u6210\u4e00\u4e2a\u9002\u7528\u4e8e\u6811\u8393\u6d3e\u67b6\u6784\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u914d\u7f6e\u6e90\u4ee3\u7801\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5728Python\u6e90\u4ee3\u7801\u7684\u6839\u76ee\u5f55\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u914d\u7f6e\u7f16\u8bd1\u53c2\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\/configure --enable-optimizations<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>--enable-optimizations<\/code>\u9009\u9879\u7528\u4e8e\u542f\u7528\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u5404\u79cd\u4f18\u5316\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u6700\u7ec8\u751f\u6210\u7684Python\u89e3\u91ca\u5668\u4e2d\u83b7\u5f97\u66f4\u597d\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7f16\u8bd1\u6e90\u4ee3\u7801\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5f00\u59cb\u7f16\u8bd1\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">make -j$(nproc)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>-j$(nproc)<\/code>\u9009\u9879\u7528\u4e8e\u5e76\u884c\u7f16\u8bd1\uff0c\u4f7f\u7528\u6240\u6709\u53ef\u7528\u7684CPU\u6838\u5fc3\u6765\u52a0\u901f\u7f16\u8bd1\u8fc7\u7a0b\u3002\u6839\u636e\u6811\u8393\u6d3e\u7684\u578b\u53f7\u548c\u6027\u80fd\uff0c\u7f16\u8bd1\u53ef\u80fd\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b89\u88c5Python<\/h3>\n<\/p>\n<p><p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u5b89\u88c5Python\u5230\u7cfb\u7edf\u4e2d\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5Python\uff1a<\/strong><\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">sudo make altinstall<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528<code>altinstall<\/code>\u800c\u4e0d\u662f<code>install<\/code>\u662f\u4e3a\u4e86\u907f\u514d\u8986\u76d6\u7cfb\u7edf\u81ea\u5e26\u7684Python\u7248\u672c\uff0c\u8fd9\u6837\u53ef\u4ee5\u540c\u65f6\u4fdd\u7559\u7cfb\u7edf\u7684Python\u7248\u672c\u548c\u65b0\u7f16\u8bd1\u5b89\u88c5\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u9a8c\u8bc1\u5b89\u88c5\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1Python\u662f\u5426\u6b63\u786e\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.x --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06<code>3.x<\/code>\u66ff\u6362\u4e3a\u60a8\u7f16\u8bd1\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u8fd9\u5c06\u8f93\u51fa\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u4fe1\u606f\uff0c\u786e\u8ba4\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f18\u5316\u548c\u914d\u7f6e\u73af\u5883<\/h3>\n<\/p>\n<p><p>\u5b8c\u6210Python\u7684\u5b89\u88c5\u540e\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u4f18\u5316\u548c\u914d\u7f6e\uff0c\u4ee5\u786e\u4fddPython\u7684\u4f7f\u7528\u66f4\u52a0\u4fbf\u6377\u548c\u9ad8\u6548\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u4e3a\u4e86\u9694\u79bb\u9879\u76ee\u7684\u4f9d\u8d56\uff0c\u53ef\u4ee5\u4f7f\u7528<code>venv<\/code>\u6a21\u5757\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.x -m venv myprojectenv<\/p>\n<p>source myprojectenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u6240\u9700\u7684Python\u5305\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5230\u5168\u5c40\u7684Python\u73af\u5883\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5b89\u88c5pip\u548c\u5176\u4ed6\u5de5\u5177\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u786e\u4fddpip\u548c\u5176\u4ed6Python\u5de5\u5177\u662f\u6700\u65b0\u7684\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.x -m pip install --upgrade pip setuptools wheel<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e9b\u5de5\u5177\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\uff0c\u662fPython\u5f00\u53d1\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u7f3a\u5c11\u5e93\u6587\u4ef6\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u5728\u914d\u7f6e\u6216\u7f16\u8bd1\u65f6\u63d0\u793a\u67d0\u4e9b\u5e93\u6587\u4ef6\u7f3a\u5931\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5\u76f8\u5e94\u7684\u5f00\u53d1\u5305\u6765\u89e3\u51b3\u3002\u4f8b\u5982\uff0c\u7f3a\u5c11SSL\u76f8\u5173\u5e93\u65f6\uff0c\u53ef\u4ee5\u5b89\u88c5<code>libssl-dev<\/code>\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6743\u9650\u95ee\u9898\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u5728<code>make<\/code>\u6216<code>make altinstall<\/code>\u8fc7\u7a0b\u4e2d\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u786e\u4fdd\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u6765\u63d0\u5347\u6743\u9650\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u7248\u672c\u51b2\u7a81\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u5b89\u88c5\u540ePython\u7248\u672c\u51b2\u7a81\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574PATH\u73af\u5883\u53d8\u91cf\u6216\u4f7f\u7528\u522b\u540d\u6765\u533a\u5206\u4e0d\u540c\u7248\u672c\u7684Python\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u5b9a\u671f\u66f4\u65b0\u548c\u7ef4\u62a4<\/h3>\n<\/p>\n<p><p>Python\u548c\u76f8\u5173\u5de5\u5177\u9700\u8981\u5b9a\u671f\u66f4\u65b0\u4ee5\u83b7\u5f97\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u8865\u4e01\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u66f4\u65b0Python\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u5b9a\u671f\u4e0b\u8f7d\u6700\u65b0\u7684Python\u7248\u672c\u6e90\u7801\u5e76\u91cd\u590d\u7f16\u8bd1\u5b89\u88c5\u8fc7\u7a0b\u4ee5\u66f4\u65b0Python\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u66f4\u65b0Python\u5305\uff1a<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b9a\u671f\u66f4\u65b0\u9879\u76ee\u4f7f\u7528\u7684Python\u5305\uff0c\u4ee5\u786e\u4fdd\u4f7f\u7528\u6700\u65b0\u7684\u529f\u80fd\u548c\u4fee\u590d\u5df2\u77e5\u6f0f\u6d1e\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5c06\u80fd\u591f\u5728\u6811\u8393\u6d3e\u4e0a\u6210\u529f\u7f16\u8bd1\u548c\u5b89\u88c5Python\uff0c\u4e3a\u9879\u76ee\u5f00\u53d1\u63d0\u4f9b\u4e00\u4e2a\u5b9a\u5236\u5316\u548c\u4f18\u5316\u7684Python\u73af\u5883\u3002\u786e\u4fdd\u5728\u6bcf\u4e2a\u6b65\u9aa4\u4e2d\u4ed4\u7ec6\u68c0\u67e5\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f\uff0c\u4ee5\u4fbf\u5feb\u901f\u89e3\u51b3\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5Python\u7684\u6700\u65b0\u7248\u672c\uff1f<\/strong><br \/>\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\u901a\u5e38\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u66f4\u65b0\u5230\u6700\u65b0\u72b6\u6001\uff0c\u4f7f\u7528\u547d\u4ee4<code>sudo apt update &amp;&amp; sudo apt upgrade<\/code>\u3002\u63a5\u4e0b\u6765\uff0c\u5b89\u88c5\u7f16\u8bd1\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff0c\u5305\u62ec<code>build-essential<\/code>\u548c<code>libssl-dev<\/code>\u7b49\u3002\u4e0b\u8f7dPython\u7684\u6e90\u4ee3\u7801\uff0c\u89e3\u538b\u540e\u8fdb\u5165\u76ee\u5f55\uff0c\u6267\u884c<code>.\/configure<\/code>\uff0c<code>make<\/code>\u548c<code>make install<\/code>\u547d\u4ee4\u5b8c\u6210\u7f16\u8bd1\u548c\u5b89\u88c5\u3002<\/p>\n<p><strong>\u7f16\u8bd1Python\u65f6\u9047\u5230\u9519\u8bef\uff0c\u8be5\u5982\u4f55\u89e3\u51b3\uff1f<\/strong><br \/>\u7f16\u8bd1Python\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\uff0c\u5e38\u89c1\u7684\u95ee\u9898\u5305\u62ec\u7f3a\u5c11\u4f9d\u8d56\u5e93\u6216\u6743\u9650\u4e0d\u8db3\u3002\u68c0\u67e5\u9519\u8bef\u4fe1\u606f\uff0c\u786e\u4fdd\u6240\u6709\u5fc5\u9700\u7684\u5e93\u548c\u5de5\u5177\u5df2\u5b89\u88c5\u3002\u53ef\u4ee5\u4f7f\u7528<code>apt<\/code>\u5b89\u88c5\u7f3a\u5931\u7684\u5e93\u3002\u5982\u679c\u662f\u6743\u9650\u95ee\u9898\uff0c\u5c1d\u8bd5\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u8fd0\u884c\u7f16\u8bd1\u547d\u4ee4\u3002<\/p>\n<p><strong>\u5982\u4f55\u9a8c\u8bc1\u5728\u6811\u8393\u6d3e\u4e0a\u6210\u529f\u7f16\u8bd1\u548c\u5b89\u88c5\u7684Python\u7248\u672c\uff1f<\/strong><br \/>\u7f16\u8bd1\u548c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3 --version<\/code>\u6216<code>python --version<\/code>\u6765\u786e\u8ba4\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5982\u679c\u663e\u793a\u7684\u662f\u4f60\u521a\u521a\u5b89\u88c5\u7684\u7248\u672c\u53f7\uff0c\u90a3\u4e48\u5b89\u88c5\u6210\u529f\u3002\u5bf9\u4e8e\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>python3 -m pip --version<\/code>\u6765\u68c0\u67e5pip\u662f\u5426\u4e5f\u5df2\u6210\u529f\u5b89\u88c5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6811\u8393\u6d3e\u7f16\u8bd1Python\u7684\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u3001\u4e0b\u8f7dPython\u6e90\u4ee3\u7801\u3001\u914d\u7f6e\u548c\u7f16\u8bd1\u6e90\u4ee3\u7801\u3001\u5b89\u88c5Python\u3002\u5b89 [&hellip;]","protected":false},"author":3,"featured_media":1019188,"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\/1019159"}],"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=1019159"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1019159\/revisions"}],"predecessor-version":[{"id":1019189,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1019159\/revisions\/1019189"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1019188"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1019159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1019159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1019159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}