{"id":927121,"date":"2024-12-26T16:01:48","date_gmt":"2024-12-26T08:01:48","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/927121.html"},"modified":"2024-12-26T16:01:50","modified_gmt":"2024-12-26T08:01:50","slug":"%e5%a6%82%e4%bd%95python%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/927121.html","title":{"rendered":"\u5982\u4f55python\u5b89\u88c5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25063419\/950ca1b0-b49d-4d5a-b6c5-94b2d7ce9791.webp\" alt=\"\u5982\u4f55python\u5b89\u88c5\" \/><\/p>\n<p><p> \u5f00\u5934\u6bb5\u843d\uff1a<br \/>\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\uff0c\u53ef\u4ee5\u901a\u8fc7<strong>\u4e0b\u8f7d\u5b98\u65b9\u5b89\u88c5\u5305\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u3001\u5b89\u88c5\u865a\u62df\u73af\u5883<\/strong>\u7b49\u65b9\u5f0f\u5b8c\u6210\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u7528\u4e8e\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8bbf\u95eePython\u89e3\u91ca\u5668\u3002\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u800c\u8a00\uff0c\u521b\u5efa\u865a\u62df\u73af\u5883\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u907f\u514d\u8f6f\u4ef6\u5305\u7248\u672c\u51b2\u7a81\uff0c\u4ece\u800c\u786e\u4fdd\u9879\u76ee\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4e0b\u8f7d\u5e76\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>\u5728Python\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8A%EF%BC%8C%E6%89%BE%E5%88%B0%E9%80%82%E5%90%88%E4%BD%A0%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84Python%E7%89%88%E6%9C%AC%E5%B9%B6%E4%B8%8B%E8%BD%BD%E3%80%82Windows%E7%94%A8%E6%88%B7%E5%8F%AF%E4%BB%A5%E4%B8%8B%E8%BD%BD.exe%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%EF%BC%8CMac%E7%94%A8%E6%88%B7%E5%8F%AF%E4%BB%A5%E4%B8%8B%E8%BD%BD.pkg%E6%96%87%E4%BB%B6%EF%BC%8C%E8%80%8CLinux%E7%94%A8%E6%88%B7%E9%80%9A%E5%B8%B8%E4%BC%9A%E9%80%89%E6%8B%A9%E6%BA%90%E7%A0%81%E6%88%96%E4%BD%BF%E7%94%A8%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E8%BF%9B%E8%A1%8C%E5%AE%89%E8%A3%85%E3%80%82\">https:\/\/www.python.org\/\uff09\u4e0a\uff0c\u627e\u5230\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u5e76\u4e0b\u8f7d\u3002Windows\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d.exe\u5b89\u88c5\u7a0b\u5e8f\uff0cMac\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d.pkg\u6587\u4ef6\uff0c\u800cLinux\u7528\u6237\u901a\u5e38\u4f1a\u9009\u62e9\u6e90\u7801\u6216\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u8fdb\u884c\u5b89\u88c5\u3002<\/a><\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u4f1a\u8ba9\u4f60\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\uff0c\u800c\u65e0\u9700\u6307\u5b9a\u5176\u5b8c\u6574\u8def\u5f84\u3002\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>python --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u8fdb\u884c\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8eLinux\u7528\u6237\uff0c\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u662f\u5b89\u88c5Python\u7684\u5e38\u89c1\u65b9\u6cd5\u3002\u4e0d\u540c\u7684Linux\u53d1\u884c\u7248\u4f7f\u7528\u4e0d\u540c\u7684\u5305\u7ba1\u7406\u5668\uff0c\u4f8b\u5982Ubuntu\u4f7f\u7528<code>apt<\/code>\uff0c\u800cCentOS\u4f7f\u7528<code>yum<\/code>\u3002\u901a\u8fc7\u5728\u7ec8\u7aef\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<p><p>Ubuntu:<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p>sudo apt install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>CentOS:<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo yum update<\/p>\n<p>sudo yum install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u7684\u597d\u5904\u662f\uff0c\u5b83\u4eec\u4f1a\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u5728\u9700\u8981\u65f6\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5b89\u88c5\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728Python\u9879\u76ee\u4e2d\uff0c\u865a\u62df\u73af\u5883\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u5de5\u5177\u3002\u5b83\u5141\u8bb8\u4f60\u5728\u4e00\u4e2a\u9694\u79bb\u7684\u73af\u5883\u4e2d\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\uff0c\u800c\u4e0d\u4f1a\u5f71\u54cd\u5168\u5c40Python\u73af\u5883\u3002\u8981\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd<code>venv<\/code>\u6a21\u5757\u5df2\u5b89\u88c5\u3002\u901a\u5e38\u5b83\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m venv my_project_env<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>my_project_env<\/code>\u7684\u76ee\u5f55\uff0c\u91cc\u9762\u5305\u542b\u4e86\u865a\u62df\u73af\u5883\u7684\u6240\u6709\u6587\u4ef6\u3002\u6fc0\u6d3b\u8fd9\u4e2a\u73af\u5883\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><p>Windows:<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">my_project_env\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Linux\/Mac:<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source my_project_env\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u540e\uff0c\u547d\u4ee4\u884c\u63d0\u793a\u7b26\u4f1a\u6709\u6240\u53d8\u5316\uff0c\u663e\u793a\u865a\u62df\u73af\u5883\u7684\u540d\u79f0\u3002\u6b64\u65f6\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u4e2a\u73af\u5883\u4e2d\u5b89\u88c5\u6240\u9700\u7684Python\u5305\uff0c\u5e76\u5f00\u59cb\u4f60\u7684\u9879\u76ee\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5b89\u88c5\u5e38\u7528\u7684Python\u5305<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u540e\uff0c\u901a\u5e38\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684\u5305\u4ee5\u5e2e\u52a9\u4f60\u8fdb\u884c\u5f00\u53d1\u3002Python\u7684\u5305\u7ba1\u7406\u5de5\u5177<code>pip<\/code>\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684Python\u5305\u53ca\u5176\u5b89\u88c5\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>requests<\/strong>\uff1a\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>numpy<\/strong>\uff1a\u7528\u4e8e\u79d1\u5b66\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>pandas<\/strong>\uff1a\u7528\u4e8e\u6570\u636e\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>matplotlib<\/strong>\uff1a\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u5b89\u88c5\u66f4\u591a\u7684\u5305\u3002\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u8fd9\u4e9b\u5305\u4e0d\u4f1a\u5f71\u54cd\u5176\u4ed6\u9879\u76ee\u7684\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u914d\u7f6eIDE\u8fdb\u884cPython\u5f00\u53d1<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684IDE\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u662f\u5f88\u91cd\u8981\u7684\u3002\u6d41\u884c\u7684Python IDE\u5305\u62ecPyCharm\u3001Visual Studio Code\u548cJupyter Notebook\u3002\u4ee5\u4e0b\u662f\u914d\u7f6e\u8fd9\u4e9bIDE\u7684\u4e00\u4e9b\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>PyCharm<\/strong>\uff1a\u5b83\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684IDE\uff0c\u4e13\u4e3aPython\u5f00\u53d1\u8bbe\u8ba1\u3002\u4f60\u53ef\u4ee5\u5728PyCharm\u4e2d\u8bbe\u7f6ePython\u89e3\u91ca\u5668\u4e3a\u4f60\u6240\u521b\u5efa\u7684\u865a\u62df\u73af\u5883\uff0c\u786e\u4fdd\u6240\u6709\u7684\u4ee3\u7801\u548c\u5305\u5728\u9694\u79bb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Visual Studio Code<\/strong>\uff1aVS Code\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u6269\u5c55\u3002\u5b89\u88c5Python\u6269\u5c55\u540e\uff0c\u4f60\u53ef\u4ee5\u5728VS Code\u4e2d\u76f4\u63a5\u8fd0\u884c\u548c\u8c03\u8bd5Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Jupyter Notebook<\/strong>\uff1a\u5b83\u975e\u5e38\u9002\u5408\u8fdb\u884c\u6570\u636e\u5206\u6790\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u9879\u76ee\u3002Jupyter Notebook\u5141\u8bb8\u4f60\u5728\u4e00\u4e2a\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3001\u67e5\u770b\u8f93\u51fa\u548c\u7f16\u5199\u6587\u6863\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u89e3\u51b3\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5e38\u89c1\u7684\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728Python\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Python\u7248\u672c\u95ee\u9898<\/strong>\uff1a\u786e\u4fdd\u4f60\u4e0b\u8f7d\u7684Python\u7248\u672c\u4e0e\u7cfb\u7edf\u517c\u5bb9\u3002\u67d0\u4e9b\u65e7\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u53ef\u80fd\u4e0d\u652f\u6301\u6700\u65b0\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6743\u9650\u95ee\u9898<\/strong>\uff1a\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5982\u679c\u9047\u5230\u6743\u9650\u4e0d\u8db3\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u6765\u63d0\u5347\u6743\u9650\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8def\u5f84\u95ee\u9898<\/strong>\uff1a\u5982\u679c\u547d\u4ee4\u884c\u65e0\u6cd5\u8bc6\u522bPython\u547d\u4ee4\uff0c\u68c0\u67e5\u662f\u5426\u6b63\u786e\u8bbe\u7f6e\u4e86\u7cfb\u7edfPATH\u53d8\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5305\u5b89\u88c5\u95ee\u9898<\/strong>\uff1a\u5982\u679c<code>pip<\/code>\u65e0\u6cd5\u5b89\u88c5\u67d0\u4e2a\u5305\uff0c\u9996\u5148\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\uff0c\u7136\u540e\u786e\u8ba4\u5305\u7684\u540d\u79f0\u548c\u7248\u672c\u53f7\u662f\u5426\u6b63\u786e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\u548c\u6280\u5de7\uff0c\u4f60\u53ef\u4ee5\u987a\u5229\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u548c\u914d\u7f6ePython\u5f00\u53d1\u73af\u5883\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0c\u638c\u63e1\u8fd9\u4e9b\u57fa\u672c\u6280\u80fd\u90fd\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u8fdb\u884c\u5b89\u88c5\uff1f<\/strong><br \/>\u5728\u9009\u62e9Python\u7248\u672c\u65f6\uff0c\u5efa\u8bae\u8003\u8651\u4f60\u7684\u9879\u76ee\u9700\u6c42\u548c\u73af\u5883\u517c\u5bb9\u6027\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u4f1a\u5305\u542b\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u4fee\u590d\uff0c\u4f46\u67d0\u4e9b\u65e7\u9879\u76ee\u53ef\u80fd\u4f9d\u8d56\u4e8e\u7279\u5b9a\u7248\u672c\u7684Python\u3002\u4f60\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u67e5\u770b\u4e0d\u540c\u7248\u672c\u7684\u7279\u6027\u548c\u652f\u6301\u60c5\u51b5\u3002<\/p>\n<p><strong>\u5b89\u88c5Python\u540e\uff0c\u5982\u4f55\u786e\u8ba4\u5b89\u88c5\u6210\u529f\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u68c0\u67e5Python\u662f\u5426\u6210\u529f\u5b89\u88c5\u3002\u82e5\u6210\u529f\uff0c\u7cfb\u7edf\u4f1a\u8fd4\u56de\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u6b64\u5916\uff0c\u8fd0\u884c<code>python<\/code>\u6216<code>python3<\/code>\u8fdb\u5165Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u8f93\u5165<code>print(&quot;Hello, World!&quot;)<\/code>\u4e5f\u53ef\u4ee5\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6b63\u5e38\u3002<\/p>\n<p><strong>Python\u5b89\u88c5\u540e\uff0c\u5982\u4f55\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1f<\/strong><br \/>\u5728Windows\u4e0a\u5b89\u88c5Python\u65f6\uff0c\u901a\u5e38\u4f1a\u6709\u4e00\u4e2a\u9009\u9879\u8ba9\u4f60\u9009\u62e9\u662f\u5426\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u3002\u82e5\u9519\u8fc7\u4e86\u8fd9\u4e00\u9009\u9879\uff0c\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0\u3002\u8fdb\u5165\u7cfb\u7edf\u5c5e\u6027\uff0c\u9009\u62e9\u201c\u73af\u5883\u53d8\u91cf\u201d\uff0c\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u201cPath\u201d\u53d8\u91cf\uff0c\u6dfb\u52a0Python\u7684\u5b89\u88c5\u76ee\u5f55\u548cScripts\u76ee\u5f55\u3002\u5bf9\u4e8eMac\u548cLinux\u7528\u6237\uff0c\u901a\u5e38\u53ef\u4ee5\u5728<code>.bash_profile<\/code>\u6216<code>.bashrc<\/code>\u6587\u4ef6\u4e2d\u6dfb\u52a0<code>export PATH=&quot;\/usr\/local\/bin\/python3:$PATH&quot;<\/code>\u6765\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d\uff1a\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e0b\u8f7d\u5b98\u65b9\u5b89\u88c5\u5305\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u3001\u5b89\u88c5\u865a\u62df\u73af\u5883\u7b49\u65b9\u5f0f\u5b8c\u6210\u3002\u901a\u5e38\u60c5\u51b5 [&hellip;]","protected":false},"author":3,"featured_media":927123,"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\/927121"}],"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=927121"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/927121\/revisions"}],"predecessor-version":[{"id":927124,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/927121\/revisions\/927124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/927123"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=927121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=927121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=927121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}