{"id":954224,"date":"2024-12-27T01:54:11","date_gmt":"2024-12-26T17:54:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/954224.html"},"modified":"2024-12-27T01:54:14","modified_gmt":"2024-12-26T17:54:14","slug":"%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bdpython%e6%ba%90%e7%a0%81%e5%8c%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/954224.html","title":{"rendered":"\u5982\u4f55\u4e0b\u8f7dpython\u6e90\u7801\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25094513\/cbbf2312-0209-4869-8d20-94b3086b96c2.webp\" alt=\"\u5982\u4f55\u4e0b\u8f7dpython\u6e90\u7801\u5305\" \/><\/p>\n<p><p> <strong>\u8981\u4e0b\u8f7dPython\u6e90\u7801\u5305\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b98\u65b9Python\u7f51\u7ad9\u3001GitHub\u4ed3\u5e93\u6216\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982pip\u6765\u5b9e\u73b0\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\uff1a\u8bbf\u95eePython\u5b98\u7f51\u5e76\u4e0b\u8f7d\u3001\u4f7f\u7528Git\u514b\u9686\u6e90\u7801\u5e93\u3001\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5\u3002<\/strong>\u5176\u4e2d\uff0c\u8bbf\u95eePython\u5b98\u7f51\u5e76\u4e0b\u8f7d\u662f\u6700\u4e3a\u76f4\u63a5\u548c\u53ef\u9760\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u8bbf\u95eePython\u5b98\u7f51\u5e76\u4e0b\u8f7d<br \/>\u9996\u5148\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E5%9C%A8%E4%B8%8B%E8%BD%BD%E9%A1%B5%E9%9D%A2%E4%B8%AD%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E6%89%BE%E5%88%B0%E4%B8%8D%E5%90%8C%E7%89%88%E6%9C%AC%E7%9A%84Python%E6%BA%90%E7%A0%81%E5%8C%85%E3%80%82%E9%80%89%E6%8B%A9%E6%82%A8%E9%9C%80%E8%A6%81%E7%9A%84%E7%89%88%E6%9C%AC%EF%BC%8C%E7%82%B9%E5%87%BB%E4%B8%8B%E8%BD%BD%E9%93%BE%E6%8E%A5%E5%8D%B3%E5%8F%AF%E3%80%82%E4%B8%8B%E8%BD%BD%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E6%82%A8%E5%B0%86%E8%8E%B7%E5%BE%97%E4%B8%80%E4%B8%AA%E5%8E%8B%E7%BC%A9%E6%A0%BC%E5%BC%8F%E7%9A%84%E6%BA%90%E7%A0%81%E5%8C%85%EF%BC%88%E5%A6%82.tar.xz%E6%88%96.zip%EF%BC%89%E3%80%82%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%A0%81%E5%8C%85%E7%9A%84%E5%A5%BD%E5%A4%84%E6%98%AF%E5%8F%AF%E4%BB%A5%E6%A0%B9%E6%8D%AE%E8%87%AA%E5%B7%B1%E7%9A%84%E9%9C%80%E8%A6%81%E5%AF%B9Python%E8%BF%9B%E8%A1%8C%E5%AE%9A%E5%88%B6%E5%92%8C%E7%BC%96%E8%AF%91%E3%80%82%E4%BE%8B%E5%A6%82%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%90%AF%E7%94%A8%E6%88%96%E7%A6%81%E7%94%A8%E6%9F%90%E4%BA%9B%E5%8A%9F%E8%83%BD%E6%A8%A1%E5%9D%97%EF%BC%8C%E6%88%96%E8%80%85%E5%9C%A8%E7%89%B9%E5%AE%9A%E5%B9%B3%E5%8F%B0%E4%B8%8A%E8%BF%9B%E8%A1%8C%E4%BC%98%E5%8C%96%E7%BC%96%E8%AF%91%E3%80%82\">https:\/\/www.python.org\/\uff09\uff0c\u5728\u4e0b\u8f7d\u9875\u9762\u4e2d\uff0c\u60a8\u53ef\u4ee5\u627e\u5230\u4e0d\u540c\u7248\u672c\u7684Python\u6e90\u7801\u5305\u3002\u9009\u62e9\u60a8\u9700\u8981\u7684\u7248\u672c\uff0c\u70b9\u51fb\u4e0b\u8f7d\u94fe\u63a5\u5373\u53ef\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u60a8\u5c06\u83b7\u5f97\u4e00\u4e2a\u538b\u7f29\u683c\u5f0f\u7684\u6e90\u7801\u5305\uff08\u5982.tar.xz\u6216.zip\uff09\u3002\u4e0b\u8f7d\u6e90\u7801\u5305\u7684\u597d\u5904\u662f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u5bf9Python\u8fdb\u884c\u5b9a\u5236\u548c\u7f16\u8bd1\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u542f\u7528\u6216\u7981\u7528\u67d0\u4e9b\u529f\u80fd\u6a21\u5757\uff0c\u6216\u8005\u5728\u7279\u5b9a\u5e73\u53f0\u4e0a\u8fdb\u884c\u4f18\u5316\u7f16\u8bd1\u3002<\/a><\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecdPython\u6e90\u7801\u5305\u4e0b\u8f7d\u548c\u4f7f\u7528\u7684\u4e0d\u540c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u8bbf\u95eePython\u5b98\u7f51\u5e76\u4e0b\u8f7d<\/p>\n<\/p>\n<p><p>\u8bbf\u95eePython\u5b98\u7f51\u662f\u83b7\u53d6Python\u6e90\u7801\u5305\u7684\u6700\u76f4\u63a5\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u8fdb\u5165Python\u5b98\u65b9\u7f51\u7ad9<br \/>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8fdb\u5165Python\u7684\u5b98\u65b9\u7f51\u7ad9\uff1a<a href=\"https:\/\/www.python.org\/%E3%80%82\">https:\/\/www.python.org\/\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u9009\u62e9\u4e0b\u8f7d\u9875\u9762<br \/>\u5728\u7f51\u7ad9\u7684\u5bfc\u822a\u680f\u4e2d\uff0c\u627e\u5230\u5e76\u70b9\u51fb\u201cDownloads\u201d\u9009\u9879\u3002\u8fd9\u5c06\u5f15\u5bfc\u60a8\u8fdb\u5165\u4e0b\u8f7d\u9875\u9762\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u9009\u62e9Python\u7248\u672c<br \/>\u5728\u4e0b\u8f7d\u9875\u9762\uff0c\u60a8\u53ef\u4ee5\u770b\u5230\u6700\u65b0\u7248\u672c\u548c\u5176\u4ed6\u7248\u672c\u7684\u4e0b\u8f7d\u9009\u9879\u3002\u9009\u62e9\u60a8\u6240\u9700\u7684Python\u7248\u672c\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\u6765\u8bf4\uff0c\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5982\u679c\u60a8\u9700\u8981\u7279\u5b9a\u7248\u672c\uff0c\u53ef\u4ee5\u5728\u9875\u9762\u5e95\u90e8\u627e\u5230\u201cView the full list of downloads\u201d\u94fe\u63a5\uff0c\u70b9\u51fb\u8fdb\u5165\u4ee5\u83b7\u53d6\u66f4\u591a\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4e0b\u8f7d\u6e90\u7801\u5305<br \/>\u5728\u6240\u9009\u7248\u672c\u7684\u4e0b\u8f7d\u9875\u9762\uff0c\u60a8\u53ef\u4ee5\u627e\u5230\u6e90\u4ee3\u7801\u7684\u4e0b\u8f7d\u94fe\u63a5\u3002\u901a\u5e38\uff0c\u6e90\u7801\u5305\u4ee5.tar.xz\u6216.zip\u683c\u5f0f\u63d0\u4f9b\u3002\u70b9\u51fb\u94fe\u63a5\u4e0b\u8f7d\u6e90\u7801\u5305\u5230\u672c\u5730\u8ba1\u7b97\u673a\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u89e3\u538b\u6e90\u7801\u5305<br \/>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u89e3\u538b\u6e90\u7801\u5305\u3002\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216\u8005\u56fe\u5f62\u5316\u5de5\u5177\u8fdb\u884c\u89e3\u538b\u3002\u4f8b\u5982\uff0c\u5728Linux\u6216macOS\u4e0a\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">tar -xf Python-&lt;version&gt;.tar.xz<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216\u8005\u5728Windows\u4e0a\u4f7f\u7528\u89e3\u538b\u5de5\u5177\u89e3\u538b.zip\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528Git\u514b\u9686\u6e90\u7801\u5e93<\/p>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u5e0c\u671b\u83b7\u53d6Python\u7684\u6700\u65b0\u6e90\u7801\u6216\u8005\u53c2\u4e0ePython\u5f00\u53d1\uff0c\u53ef\u4ee5\u4f7f\u7528Git\u514b\u9686Python\u7684\u6e90\u7801\u5e93\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5b89\u88c5Git<br \/>\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u4e0a\u5df2\u5b89\u88c5Git\u3002\u5982\u679c\u6ca1\u6709\uff0c\u53ef\u4ee5\u8bbf\u95eeGit\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/git-scm.com\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85%E3%80%82\">https:\/\/git-scm.com\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u514b\u9686Python\u6e90\u7801\u5e93<br \/>\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u514b\u9686Python\u7684\u6e90\u7801\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git clone https:\/\/github.com\/python\/cpython.git<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u514b\u9686Python\u7684\u4e3b\u5206\u652f\u5230\u672c\u5730\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5207\u6362\u5230\u7279\u5b9a\u7248\u672c\uff08\u53ef\u9009\uff09<br \/>\u5982\u679c\u60a8\u9700\u8981\u7279\u5b9a\u7684Python\u7248\u672c\uff0c\u53ef\u4ee5\u5728\u514b\u9686\u540e\u5207\u6362\u5230\u76f8\u5e94\u7684\u5206\u652f\u6216\u6807\u7b7e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd cpython<\/p>\n<p>git checkout tags\/v3.x.y -b my-branch-name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>v3.x.y<\/code>\u662f\u60a8\u9700\u8981\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u66f4\u65b0\u6e90\u7801\u5e93<br \/>\u4e3a\u4e86\u4fdd\u6301\u6e90\u7801\u5e93\u7684\u6700\u65b0\u72b6\u6001\uff0c\u60a8\u53ef\u4ee5\u5b9a\u671f\u62c9\u53d6\u6700\u65b0\u7684\u66f4\u6539\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git pull origin m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u867d\u7136\u5305\u7ba1\u7406\u5de5\u5177\u5982pip\u901a\u5e38\u7528\u4e8e\u5b89\u88c5Python\u5e93\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u4e5f\u53ef\u4ee5\u7528\u6765\u83b7\u53d6\u6e90\u7801\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528pip\u4e0b\u8f7d\u6e90\u7801<br \/>\u4f7f\u7528pip\uff0c\u60a8\u53ef\u4ee5\u4e0b\u8f7dPython\u5e93\u7684\u6e90\u7801\u3002\u867d\u7136pip\u4e0d\u662f\u76f4\u63a5\u7528\u4e8e\u4e0b\u8f7dPython\u89e3\u91ca\u5668\u6e90\u7801\u7684\u5de5\u5177\uff0c\u4f46\u53ef\u4ee5\u7528\u6765\u83b7\u53d6\u5e93\u7684\u6e90\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip download &lt;package-name&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4e0b\u8f7d\u6307\u5b9a\u5e93\u7684\u6e90\u7801\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7\u6e90\u4ee3\u7801\u5b89\u88c5Python\u5e93<br \/>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u89e3\u538b\u6e90\u7801\u5305\u5e76\u8fdb\u5165\u89e3\u538b\u76ee\u5f55\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u60a8\u7684Python\u73af\u5883\u4e2d\u5b89\u88c5\u8be5\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u7f16\u8bd1\u548c\u5b89\u88c5Python\u6e90\u7801<\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u60a8\u4e0b\u8f7d\u5e76\u89e3\u538b\u4e86Python\u6e90\u7801\u5305\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5b89\u88c5\u4f9d\u8d56\u9879<br \/>\u5728\u7f16\u8bd1Python\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u7cfb\u7edf\u4e0a\u5b89\u88c5\u4e86\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\u3002\u4ee5Ubuntu\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u4f9d\u8d56\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get update<\/p>\n<p>sudo apt-get install build-essential checkinstall<\/p>\n<p>sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \\<\/p>\n<p>libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u7f16\u8bd1\u9009\u9879<br \/>\u8fdb\u5165\u6e90\u7801\u76ee\u5f55\uff0c\u8fd0\u884c\u914d\u7f6e\u811a\u672c\u4ee5\u68c0\u67e5\u7cfb\u7edf\u73af\u5883\u5e76\u8bbe\u7f6e\u7f16\u8bd1\u9009\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\/configure<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u6dfb\u52a0\u9009\u9879\uff0c\u4f8b\u5982\u6307\u5b9a\u5b89\u88c5\u76ee\u5f55\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\/configure --prefix=\/opt\/python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u7f16\u8bd1\u6e90\u7801<br \/>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7f16\u8bd1\u6e90\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">make<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u5230\u51e0\u5341\u5206\u949f\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u60a8\u7684\u7cfb\u7edf\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5b89\u88c5Python<br \/>\u7f16\u8bd1\u6210\u529f\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo make install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u60a8\u6307\u5b9a\u7684\u76ee\u5f55\u4e2d\u5b89\u88c5Python\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u9a8c\u8bc1\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u9a8c\u8bc1Python\u662f\u5426\u6b63\u786e\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u68c0\u67e5Python\u7248\u672c<br \/>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u68c0\u67e5Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u8f93\u51faPython\u7684\u7248\u672c\u53f7\uff0c\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u884cPython\u89e3\u91ca\u5668<br \/>\u8f93\u5165<code>python3<\/code>\u547d\u4ee4\uff0c\u8fdb\u5165Python\u89e3\u91ca\u5668\u3002\u60a8\u53ef\u4ee5\u5728\u89e3\u91ca\u5668\u4e2d\u8fd0\u884c\u4e00\u4e9b\u7b80\u5355\u7684Python\u4ee3\u7801\u4ee5\u8fdb\u4e00\u6b65\u9a8c\u8bc1\u5b89\u88c5\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, Python!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/p>\n<\/p>\n<p><p>\u5728\u4e0b\u8f7d\u3001\u7f16\u8bd1\u548c\u5b89\u88c5Python\u6e90\u7801\u5305\u65f6\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u7f3a\u5c11\u4f9d\u8d56\u9879<br \/>\u5982\u679c\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u9047\u5230\u7f3a\u5c11\u4f9d\u8d56\u9879\u7684\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u5e76\u5b89\u88c5\u7f3a\u5931\u7684\u5e93\u3002\u4f8b\u5982\uff0cOpenSSL\u5e93\u662f\u5e38\u89c1\u7684\u4f9d\u8d56\u9879\u4e4b\u4e00\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6743\u9650\u95ee\u9898<br \/>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u9047\u5230\u6743\u9650\u9519\u8bef\uff0c\u8bf7\u786e\u4fdd\u4f7f\u7528\u4e86<code>sudo<\/code>\u547d\u4ee4\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u7248\u672c\u51b2\u7a81<br \/>\u5982\u679c\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86\u5176\u4ed6\u7248\u672c\u7684Python\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u51b2\u7a81\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u4e0d\u540c\u7684\u5b89\u88c5\u76ee\u5f55\u6765\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u6210\u529f\u4e0b\u8f7d\u3001\u7f16\u8bd1\u548c\u5b89\u88c5Python\u6e90\u7801\u5305\uff0c\u5e76\u6839\u636e\u9700\u8981\u5bf9Python\u8fdb\u884c\u5b9a\u5236\u548c\u4f18\u5316\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u5230\u60a8\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u627e\u5230\u9002\u5408\u6211\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u6e90\u7801\u5305\uff1f<\/strong><br \/>\u5728\u4e0b\u8f7dPython\u6e90\u7801\u5305\u4e4b\u524d\uff0c\u9700\u8981\u786e\u8ba4\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b\uff08\u5982Windows\u3001macOS\u6216Linux\uff09\u3002\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff0c\u9009\u62e9\u201cDownloads\u201d\u9875\u9762\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u63a8\u8350\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u901a\u5e38\u4ee5.tar.xz\u6216.zip\u683c\u5f0f\u63d0\u4f9b\uff0c\u786e\u4fdd\u9009\u62e9\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u517c\u5bb9\u7684\u6587\u4ef6\u3002<\/p>\n<p><strong>\u4e0b\u8f7dPython\u6e90\u7801\u5305\u540e\uff0c\u6211\u5e94\u8be5\u5982\u4f55\u8fdb\u884c\u5b89\u88c5\uff1f<\/strong><br \/>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u89e3\u538b\u7f29\u6e90\u7801\u5305\u3002\u63a5\u7740\uff0c\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8fdb\u5165\u89e3\u538b\u540e\u7684\u76ee\u5f55\uff0c\u8fd0\u884c<code>.\/configure<\/code>\u547d\u4ee4\u6765\u914d\u7f6e\u5b89\u88c5\u9009\u9879\u3002\u968f\u540e\u6267\u884c<code>make<\/code>\u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\uff0c\u6700\u540e\u4f7f\u7528<code>make install<\/code>\u547d\u4ee4\u5c06Python\u5b89\u88c5\u5230\u60a8\u7684\u7cfb\u7edf\u4e2d\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u6839\u636e\u60a8\u7684\u7cfb\u7edf\u9700\u6c42\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u9879\u3002<\/p>\n<p><strong>\u4e0b\u8f7dPython\u6e90\u7801\u5305\u7684\u4e3b\u8981\u4f18\u52bf\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u4e0b\u8f7dPython\u6e90\u7801\u5305\u7684\u4e3b\u8981\u4f18\u52bf\u5728\u4e8e\u60a8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5b89\u88c5\u9009\u9879\uff0c\u9009\u62e9\u9700\u8981\u7684\u6a21\u5757\u548c\u5e93\uff0c\u5e76\u4f18\u5316\u6027\u80fd\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u7f16\u8bd1\u65f6\u542f\u7528\u7279\u5b9a\u7684\u529f\u80fd\u6216\u7981\u7528\u4e0d\u5fc5\u8981\u7684\u90e8\u5206\uff0c\u4ece\u800c\u4f7fPython\u66f4\u9002\u5408\u60a8\u7684\u7279\u5b9a\u9700\u6c42\u3002\u6b64\u5916\uff0c\u6e90\u7801\u5305\u4e5f\u9002\u5408\u5f00\u53d1\u8005\u8fdb\u884c\u4e8c\u6b21\u5f00\u53d1\u6216\u8c03\u8bd5\uff0c\u63d0\u4f9b\u66f4\u591a\u7075\u6d3b\u6027\u548c\u63a7\u5236\u6743\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u4e0b\u8f7dPython\u6e90\u7801\u5305\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b98\u65b9Python\u7f51\u7ad9\u3001GitHub\u4ed3\u5e93\u6216\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982pip\u6765\u5b9e\u73b0\u3002\u4ee5\u4e0b [&hellip;]","protected":false},"author":3,"featured_media":954230,"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\/954224"}],"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=954224"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/954224\/revisions"}],"predecessor-version":[{"id":954232,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/954224\/revisions\/954232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/954230"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=954224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=954224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=954224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}