{"id":921908,"date":"2024-12-26T14:22:49","date_gmt":"2024-12-26T06:22:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/921908.html"},"modified":"2024-12-26T14:22:51","modified_gmt":"2024-12-26T06:22:51","slug":"python-%e5%a6%82%e4%bd%95%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/921908.html","title":{"rendered":"python \u5982\u4f55\u66f4\u65b0"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210636\/0d11fee1-2a45-418f-9121-dd07b700efc6.webp\" alt=\"python \u5982\u4f55\u66f4\u65b0\" \/><\/p>\n<p><p> <strong>\u8981\u66f4\u65b0Python\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u901a\u8fc7Python\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982Homebrew\u6216Chocolatey\u8fdb\u884c\u66f4\u65b0\u3001\u4f7f\u7528Anaconda\u7b49Python\u53d1\u884c\u7248\u8fdb\u884c\u66f4\u65b0\u3002<\/strong>\u5176\u4e2d\uff0c\u901a\u8fc7Python\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248\u672c\u662f\u6700\u76f4\u63a5\u548c\u5e38\u7528\u7684\u65b9\u6cd5\u3002\u7528\u6237\u53ea\u9700\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684\u6700\u65b0\u7248\u672c\u5b89\u88c5\u5305\uff0c\u7136\u540e\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u5b8c\u6210\u5b89\u88c5\u5373\u53ef\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\u53ef\u4ee5\u786e\u4fdd\u83b7\u5f97\u5b98\u65b9\u652f\u6301\u7684\u6700\u65b0\u529f\u80fd\u548c\u5b89\u5168\u8865\u4e01\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7Python\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u66f4\u65b0<\/p>\n<\/p>\n<p><p>Python\u5b98\u7f51\u662f\u83b7\u53d6\u6700\u65b0Python\u7248\u672c\u7684\u6700\u53ef\u9760\u6765\u6e90\u3002\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u5408\u9002\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u9009\u62e9\u66f4\u65b0\u73b0\u6709\u7248\u672c\u6216\u8005\u5b89\u88c5\u5230\u65b0\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u548c\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u8bbf\u95eePython\u5b98\u7f51\uff08python.org\uff09\uff0c\u5728\u4e0b\u8f7d\u9875\u9762\u9009\u62e9\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u5b89\u88c5\u5305\u5f00\u59cb\u5b89\u88c5\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u66f4\u65b0\u73b0\u6709Python\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff0c\u5b89\u88c5\u65b0\u7248\u672c\u65f6\u53ef\u80fd\u9700\u8981\u9009\u62e9\u66f4\u65b0\u73b0\u6709\u7248\u672c\u6216\u8005\u5b89\u88c5\u5230\u65b0\u7684\u76ee\u5f55\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u9009\u62e9\u66f4\u65b0\u73b0\u6709\u7248\u672c\u53ef\u4ee5\u81ea\u52a8\u66ff\u6362\u65e7\u7248\u672c\uff0c\u540c\u65f6\u4fdd\u7559\u4f60\u4e4b\u524d\u5b89\u88c5\u7684\u5305\u548c\u8bbe\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u66f4\u65b0Python<\/p>\n<\/p>\n<p><p>\u5728Windows\u548cMacOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982Homebrew\uff08MacOS\uff09\u548cChocolatey\uff08Windows\uff09\u6765\u66f4\u65b0Python\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u81ea\u52a8\u7ba1\u7406\u8f6f\u4ef6\u5305\u53ca\u5176\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Homebrew\uff08MacOS\uff09<\/strong><\/p>\n<\/p>\n<p><p>\u5728MacOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528Homebrew\u66f4\u65b0Python\u3002\u9996\u5148\uff0c\u786e\u4fddHomebrew\u5df2\u7ecf\u5b89\u88c5\u5e76\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u66f4\u65b0Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew update<\/p>\n<p>brew upgrade python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Chocolatey\uff08Windows\uff09<\/strong><\/p>\n<\/p>\n<p><p>Chocolatey\u662fWindows\u4e0a\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u66f4\u65b0Python\u3002\u9996\u5148\uff0c\u786e\u4fddChocolatey\u5df2\u7ecf\u5b89\u88c5\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">choco upgrade python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4f1a\u66f4\u65b0\u4f60\u7684Python\u7248\u672c\u5230\u6700\u65b0\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528Anaconda\u66f4\u65b0Python<\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u79cd\u6d41\u884c\u7684Python\u53d1\u884c\u7248\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u5e94\u7528\u3002\u5b83\u81ea\u5e26\u4e86\u8bb8\u591a\u5e38\u7528\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\u548c\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u66f4\u65b0Anaconda\u4e2d\u7684Python<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u66f4\u65b0Anaconda\u4e2d\u7684Python\uff0c\u53ef\u4ee5\u4f7f\u7528conda\u547d\u4ee4\u3002\u5728Anaconda Prompt\u6216\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda update conda<\/p>\n<p>conda update python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u786e\u4fdd\u4f60\u7684conda\u73af\u5883\u548cPython\u90fd\u662f\u6700\u65b0\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ba1\u7406\u591a\u4e2aPython\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>Anaconda\u5141\u8bb8\u4f60\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2aPython\u73af\u5883\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u4e0d\u540c\u9879\u76ee\u4e2d\u4f7f\u7528\u4e0d\u540c\u7248\u672c\u7684Python\u3002\u5728\u66f4\u65b0Python\u65f6\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u53ea\u66f4\u65b0\u67d0\u4e2a\u7279\u5b9a\u7684\u73af\u5883\uff0c\u800c\u4e0d\u662f\u5168\u5c40\u66f4\u65b0\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u786e\u8ba4Python\u66f4\u65b0\u6210\u529f<\/p>\n<\/p>\n<p><p>\u66f4\u65b0Python\u540e\uff0c\u786e\u8ba4\u5b89\u88c5\u7684\u7248\u672c\u662f\u6700\u65b0\u7684\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u67e5\u770bPython\u7248\u672c\u6765\u786e\u8ba4\u66f4\u65b0\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5728\u547d\u4ee4\u884c\u4e2d\u68c0\u67e5\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u6216MacOS\/Linux\u7684\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216\u8005<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u663e\u793a\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u786e\u8ba4Python\u7248\u672c\u66f4\u65b0\u6210\u529f\u540e\uff0c\u5efa\u8bae\u8fd0\u884c\u4e00\u4e9b\u7b80\u5355\u7684Python\u811a\u672c\u6765\u786e\u4fdd\u4e00\u5207\u6b63\u5e38\u5de5\u4f5c\u3002\u53ef\u4ee5\u5c1d\u8bd5\u5bfc\u5165\u4e00\u4e9b\u5e38\u7528\u7684\u5e93\uff0c\u5982<code>numpy<\/code>\u6216<code>pandas<\/code>\uff0c\u4ee5\u786e\u4fdd\u66f4\u65b0\u6ca1\u6709\u5f71\u54cd\u5230\u5e93\u7684\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u5904\u7406\u66f4\u65b0\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u66f4\u65b0Python\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u5982\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u9519\u8bef\u3001\u5e93\u517c\u5bb9\u6027\u95ee\u9898\u7b49\u3002\u4e86\u89e3\u8fd9\u4e9b\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u987a\u5229\u5b8c\u6210\u66f4\u65b0\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u66f4\u65b0Python\u540e\uff0c\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u786e\u4fdd\u65b0\u7684Python\u8def\u5f84\u5df2\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684PATH\u4e2d\u3002\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7cfb\u7edf\u8bbe\u7f6e\u8fdb\u884c\u68c0\u67e5\u548c\u4fee\u6539\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5e93\u517c\u5bb9\u6027\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u66f4\u65b0Python\u540e\uff0c\u67d0\u4e9b\u7b2c\u4e09\u65b9\u5e93\u53ef\u80fd\u4e0d\u518d\u517c\u5bb9\u3002\u53ef\u4ee5\u901a\u8fc7\u91cd\u65b0\u5b89\u88c5\u6216\u66f4\u65b0\u8fd9\u4e9b\u5e93\u6765\u89e3\u51b3\u95ee\u9898\u3002\u4f7f\u7528<code>pip<\/code>\u5de5\u5177\u66f4\u65b0\u5e93\u7684\u547d\u4ee4\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade \u5305\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u6709\u6548\u907f\u514d\u7248\u672c\u51b2\u7a81\u95ee\u9898\u3002\u865a\u62df\u73af\u5883\u5141\u8bb8\u4f60\u4e3a\u6bcf\u4e2a\u9879\u76ee\u521b\u5efa\u72ec\u7acb\u7684Python\u73af\u5883\uff0c\u786e\u4fdd\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\u4e0d\u4f1a\u4e92\u76f8\u5e72\u6270\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u7ef4\u62a4Python\u66f4\u65b0\u7684\u826f\u597d\u4e60\u60ef<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fddPython\u73af\u5883\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\uff0c\u5b9a\u671f\u68c0\u67e5\u548c\u66f4\u65b0Python\u7248\u672c\u548c\u5e93\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u7ef4\u62a4Python\u66f4\u65b0\u7684\u826f\u597d\u4e60\u60ef\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b9a\u671f\u68c0\u67e5\u66f4\u65b0<\/strong><\/p>\n<\/p>\n<p><p>\u5b9a\u671f\u8bbf\u95eePython\u5b98\u7f51\u6216\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u68c0\u67e5\u66f4\u65b0\uff0c\u4ee5\u786e\u4fdd\u4f60\u4f7f\u7528\u7684\u662f\u6700\u65b0\u7248\u672c\u3002\u6700\u65b0\u7248\u672c\u901a\u5e38\u5305\u542b\u91cd\u8981\u7684\u5b89\u5168\u8865\u4e01\u548c\u65b0\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5907\u4efd\u91cd\u8981\u9879\u76ee<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u66f4\u65b0Python\u7248\u672c\u4e4b\u524d\uff0c\u5907\u4efd\u91cd\u8981\u7684\u9879\u76ee\u6587\u4ef6\u548c\u73af\u5883\u8bbe\u7f6e\uff0c\u4ee5\u9632\u66f4\u65b0\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u95ee\u9898\u3002\u8fd9\u6837\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u5feb\u901f\u6062\u590d\u5230\u4e4b\u524d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5173\u6ce8\u793e\u533a\u52a8\u6001<\/strong><\/p>\n<\/p>\n<p><p>\u5173\u6ce8Python\u793e\u533a\u7684\u52a8\u6001\uff0c\u4f8b\u5982\u52a0\u5165Python\u90ae\u4ef6\u5217\u8868\u6216\u5173\u6ce8\u76f8\u5173\u8bba\u575b\uff0c\u53ef\u4ee5\u53ca\u65f6\u4e86\u89e3Python\u7684\u66f4\u65b0\u4fe1\u606f\u548c\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u9075\u5faa\u4e0a\u8ff0\u6b65\u9aa4\u548c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u987a\u5229\u5730\u66f4\u65b0Python\uff0c\u5e76\u4fdd\u6301\u5f00\u53d1\u73af\u5883\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\u3002Python\u7684\u66f4\u65b0\u4e0d\u4ec5\u80fd\u591f\u63d0\u4f9b\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u4fee\u590d\uff0c\u8fd8\u80fd\u591f\u63d0\u5347\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002\u5e0c\u671b\u8fd9\u4e9b\u5efa\u8bae\u80fd\u591f\u5e2e\u52a9\u4f60\u5728Python\u7684\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u66f4\u52a0\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u68c0\u67e5\u6211\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\uff1f<\/strong><br \/>\u8981\u67e5\u770b\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\uff0c\u53ef\u4ee5\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u3002\u8fd9\u5c06\u663e\u793a\u60a8\u5f53\u524d\u4f7f\u7528\u7684Python\u7248\u672c\u53f7\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fAnaconda\uff0c\u53ef\u4ee5\u5728Anaconda Navigator\u4e2d\u67e5\u770b\u6216\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>conda list<\/code>\u3002<\/p>\n<p><strong>\u5728Windows\u4e0a\u5982\u4f55\u66f4\u65b0Python\uff1f<\/strong><br \/>\u5728Windows\u4e0a\u66f4\u65b0Python\u7684\u6b65\u9aa4\u76f8\u5bf9\u7b80\u5355\u3002\u60a8\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u8bc6\u522b\u73b0\u6709\u7248\u672c\uff0c\u5e76\u63d0\u4f9b\u66f4\u65b0\u9009\u9879\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u65b9\u4fbf\u5730\u4f7f\u7528Python\u3002<\/p>\n<p><strong>\u5728Linux\u7cfb\u7edf\u4e2d\u5982\u4f55\u5347\u7ea7Python\uff1f<\/strong><br \/>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u66f4\u65b0Python\u901a\u5e38\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u3002\u5bf9\u4e8e\u57fa\u4e8eDebian\u7684\u7cfb\u7edf\uff08\u5982Ubuntu\uff09\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sudo apt update<\/code>\u548c<code>sudo apt upgrade python3<\/code>\u547d\u4ee4\u6765\u66f4\u65b0Python\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u5176\u4ed6\u53d1\u884c\u7248\uff0c\u53ef\u4ee5\u53c2\u8003\u76f8\u5e94\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u6216\u8003\u8651\u4f7f\u7528<code>pyenv<\/code>\u7b49\u5de5\u5177\u6765\u7ba1\u7406Python\u7248\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u66f4\u65b0Python\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u901a\u8fc7Python\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982Homebre [&hellip;]","protected":false},"author":3,"featured_media":921913,"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\/921908"}],"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=921908"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921908\/revisions"}],"predecessor-version":[{"id":921916,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921908\/revisions\/921916"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/921913"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=921908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=921908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=921908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}