{"id":982561,"date":"2024-12-27T07:11:51","date_gmt":"2024-12-26T23:11:51","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/982561.html"},"modified":"2024-12-27T07:11:53","modified_gmt":"2024-12-26T23:11:53","slug":"%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%adpython%e6%98%af%e5%90%a6%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/982561.html","title":{"rendered":"\u5982\u4f55\u5224\u65adpython\u662f\u5426\u5b89\u88c5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211009\/6930f8a8-73dd-47d6-b523-d1ae34279b06.webp\" alt=\"\u5982\u4f55\u5224\u65adpython\u662f\u5426\u5b89\u88c5\" \/><\/p>\n<p><p> <strong>\u5224\u65adPython\u662f\u5426\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u68c0\u67e5\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4\u3001\u67e5\u770b\u7279\u5b9a\u76ee\u5f55\u3002<\/strong>\u5176\u4e2d\uff0c<strong>\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4<\/strong>\u662f\u6700\u76f4\u63a5\u548c\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u5b83\u901a\u8fc7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Mac\/Linux\uff09\u4e2d\u8f93\u5165\u7279\u5b9a\u547d\u4ee4\u6765\u9a8c\u8bc1Python\u7684\u5b89\u88c5\u72b6\u6001\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u8981\u901a\u8fc7\u547d\u4ee4\u884c\u786e\u8ba4Python\u662f\u5426\u5b89\u88c5\uff0c\u60a8\u53ef\u4ee5\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Mac\/Linux\uff09\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code>python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216<\/p>\n<\/p>\n<p><pre><code>python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679cPython\u5df2\u5b89\u88c5\uff0c\u60a8\u5c06\u770b\u5230\u7c7b\u4f3c\u4e8e <code>Python 3.x.x<\/code> \u7684\u8f93\u51fa\uff0c\u8fd9\u5c06\u663e\u793a\u60a8\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5982\u679c\u51fa\u73b0\u201ccommand not found\u201d\u6216\u7c7b\u4f3c\u7684\u6d88\u606f\uff0c\u5219\u8868\u793aPython\u53ef\u80fd\u672a\u5b89\u88c5\u6216\u672a\u6b63\u786e\u914d\u7f6e\u5728\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001\u68c0\u67e5\u7cfb\u7edf\u73af\u5883\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u662f\u64cd\u4f5c\u7cfb\u7edf\u7528\u6765\u5b58\u50a8\u7cfb\u7edf\u7ea7\u522b\u7684\u914d\u7f6e\u4fe1\u606f\u7684\u5730\u65b9\u3002\u5bf9\u4e8ePython\uff0c\u901a\u5e38\u4f1a\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5c06\u5176\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4f7f\u5f97\u5728\u547d\u4ee4\u884c\u4e2d\u80fd\u591f\u76f4\u63a5\u8fd0\u884cPython\u76f8\u5173\u547d\u4ee4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u67e5\u770bPython\u662f\u5426\u5728\u73af\u5883\u53d8\u91cf\u4e2d\uff1a\n<ul>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u8ba1\u7b97\u673a\u201d\u6216\u201c\u6b64\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u540d\u4e3a\u201cPath\u201d\u7684\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002<\/li>\n<li>\u67e5\u770b\u662f\u5426\u6709Python\u7684\u5b89\u88c5\u8def\u5f84\uff08\u5982\uff1a<code>C:\\Python39<\/code>\uff09\u5728\u5217\u8868\u4e2d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Mac\/Linux\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728\u7ec8\u7aef\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u67e5\u770b\u73af\u5883\u53d8\u91cf\uff1a\n<pre><code class=\"language-bash\">echo $PATH<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u67e5\u770b\u8f93\u51fa\u4e2d\u662f\u5426\u5305\u542bPython\u7684\u5b89\u88c5\u8def\u5f84\uff08\u5982\uff1a<code>\/usr\/local\/bin\/python3<\/code>\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u5982\u679c\u8def\u5f84\u4e2d\u5305\u542bPython\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u5e76\u914d\u7f6e\u5728\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4\u662f\u5224\u65adPython\u662f\u5426\u5b89\u88c5\u7684\u6700\u76f4\u63a5\u65b9\u6cd5\u3002\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u7279\u5b9a\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u786e\u8ba4Python\u7684\u5b58\u5728\u548c\u7248\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b <code>Win + R<\/code>\uff0c\u8f93\u5165 <code>cmd<\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\uff09\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a\n<pre><code class=\"language-bash\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p>\u6216<\/p>\n<pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5982\u679cPython\u5df2\u5b89\u88c5\uff0c\u60a8\u5c06\u770b\u5230Python\u7248\u672c\u53f7\u7684\u8f93\u51fa\uff0c\u5982 <code>Python 3.9.1<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Mac\/Linux\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a\n<pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5982\u679cPython\u5df2\u5b89\u88c5\uff0c\u7ec8\u7aef\u5c06\u663e\u793aPython\u7248\u672c\u53f7\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u67e5\u770b\u7279\u5b9a\u76ee\u5f55<\/p>\n<\/p>\n<p><p>Python\u5b89\u88c5\u901a\u5e38\u4f1a\u5728\u7cfb\u7edf\u7684\u7279\u5b9a\u76ee\u5f55\u4e2d\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6\u3002\u901a\u8fc7\u68c0\u67e5\u8fd9\u4e9b\u76ee\u5f55\uff0c\u60a8\u53ef\u4ee5\u786e\u8ba4Python\u662f\u5426\u5b89\u88c5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u5b89\u88c5\u5728 <code>C:\\PythonXX<\/code>\uff08\u5176\u4e2d <code>XX<\/code> \u662f\u7248\u672c\u53f7\uff09\u6216\u5728 <code>C:\\Users\\&lt;YourUsername&gt;\\AppData\\Local\\Programs\\Python\\PythonXX\\<\/code>\u3002<\/li>\n<li>\u60a8\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5668\u5bfc\u822a\u5230\u8fd9\u4e9b\u8def\u5f84\uff0c\u67e5\u770b\u662f\u5426\u5b58\u5728Python\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Mac\/Linux\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u5b89\u88c5\u5728 <code>\/usr\/local\/bin\/<\/code> \u6216 <code>\/usr\/bin\/<\/code>\u3002<\/li>\n<li>\u60a8\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u8fd9\u4e9b\u76ee\u5f55\uff1a\n<pre><code class=\"language-bash\">ls \/usr\/local\/bin\/python*<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p>\u6216<\/p>\n<pre><code class=\"language-bash\">ls \/usr\/bin\/python*<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5982\u679c\u5217\u51fa\u4e86Python\u6587\u4ef6\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528Python\u81ea\u5e26\u5de5\u5177<\/p>\n<\/p>\n<p><p>Python\u81ea\u5e26\u7684\u5de5\u5177\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u60a8\u786e\u8ba4Python\u662f\u5426\u5b89\u88c5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>IDLE\uff08Python\u7684\u96c6\u6210\u5f00\u53d1\u548c\u5b66\u4e60\u73af\u5883\uff09<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>Python\u901a\u5e38\u9644\u5e26\u4e00\u4e2a\u540d\u4e3aIDLE\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002\u5b89\u88c5Python\u65f6\uff0cIDLE\u4e5f\u4f1a\u81ea\u52a8\u5b89\u88c5\u3002<\/li>\n<li>\u60a8\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u5217\u8868\u4e2d\u67e5\u627eIDLE\uff0c\u8fd0\u884c\u5b83\u3002\u5982\u679c\u5b83\u80fd\u542f\u52a8\uff0c\u8fd9\u8868\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>pip\uff08Python\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff09<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002\u5b89\u88c5Python\u65f6\uff0c\u901a\u5e38\u4e5f\u4f1a\u5b89\u88c5pip\u3002<\/li>\n<li>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5pip\u7248\u672c\uff1a\n<pre><code class=\"language-bash\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5982\u679c\u663e\u793apip\u7248\u672c\u53f7\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u901a\u8fc7\u56fe\u5f62\u5316\u5b89\u88c5\u5de5\u5177\u786e\u8ba4<\/p>\n<\/p>\n<p><p>\u5728\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u8bb8\u591aPython\u5b89\u88c5\u90fd\u662f\u901a\u8fc7\u56fe\u5f62\u5316\u5b89\u88c5\u5de5\u5177\u5b8c\u6210\u7684\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u4f1a\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u63d0\u793a\u5b89\u88c5\u72b6\u6001\u548c\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u80fd\u4f7f\u7528Python\u5b98\u7f51\u63d0\u4f9b\u7684\u5b89\u88c5\u7a0b\u5e8f\uff08.exe\u6587\u4ef6\uff09\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<li>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u63d0\u4f9b\u5b89\u88c5\u8def\u5f84\u548c\u7ec4\u4ef6\u9009\u62e9\u9009\u9879\u3002\u60a8\u53ef\u4ee5\u67e5\u770b\u8fd9\u4e9b\u4fe1\u606f\u786e\u8ba4Python\u5b89\u88c5\u72b6\u6001\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Mac\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>Mac\u7528\u6237\u901a\u5e38\u901a\u8fc7Homebrew\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5Python\u3002<\/li>\n<li>\u60a8\u53ef\u4ee5\u901a\u8fc7Homebrew\u786e\u8ba4Python\u5b89\u88c5\uff1a\n<pre><code class=\"language-bash\">brew list | grep python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Linux\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Linux\u4e0a\uff0cPython\u901a\u5e38\u901a\u8fc7\u7cfb\u7edf\u7684\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5\uff0c\u5982apt\uff08Ubuntu\/Debian\uff09\u6216yum\uff08CentOS\/Fedora\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5Python\u5b89\u88c5\uff1a\n<pre><code class=\"language-bash\">dpkg -l | grep python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p>\u6216<\/p>\n<pre><code class=\"language-bash\">rpm -qa | grep python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u591a\u79cd\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u5168\u9762\u68c0\u67e5\u548c\u786e\u8ba4Python\u662f\u5426\u5df2\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\uff0c\u4ee5\u53ca\u5b89\u88c5\u7684Python\u7248\u672c\u548c\u8def\u5f84\u4fe1\u606f\u3002\u8fd9\u4e9b\u6b65\u9aa4\u4e0d\u4ec5\u5e2e\u52a9\u60a8\u5224\u65adPython\u7684\u5b89\u88c5\u72b6\u6001\uff0c\u8fd8\u4e3a\u60a8\u540e\u7eed\u7684Python\u5f00\u53d1\u5de5\u4f5c\u63d0\u4f9b\u4e86\u57fa\u7840\u914d\u7f6e\u4fdd\u969c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u8ba4\u6211\u7684\u8ba1\u7b97\u673a\u4e0a\u662f\u5426\u5b89\u88c5\u4e86Python\uff1f<\/strong><br \/>\u8981\u68c0\u67e5\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u662f\u5426\u5b89\u88c5\u4e86Python\uff0c\u60a8\u53ef\u4ee5\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Mac\/Linux\uff09\uff0c\u7136\u540e\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u3002\u5982\u679cPython\u5df2\u5b89\u88c5\uff0c\u60a8\u5c06\u770b\u5230\u5176\u7248\u672c\u53f7\u663e\u793a\u5728\u5c4f\u5e55\u4e0a\u3002\u5982\u679c\u672a\u5b89\u88c5\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u60a8\u627e\u4e0d\u5230\u8be5\u547d\u4ee4\u3002<\/p>\n<p><strong>\u5728Windows\u548cMac\u4e0a\u68c0\u67e5Python\u5b89\u88c5\u7684\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u4ee5\u6309\u4e0b\u201cWin + R\u201d\u952e\uff0c\u8f93\u5165<code>cmd<\/code>\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python --version<\/code>\u3002\u5728Mac\u4e0a\uff0c\u6253\u5f00\u201c\u7ec8\u7aef\u201d\uff0c\u8f93\u5165\u76f8\u540c\u7684\u547d\u4ee4\u3002\u5982\u679c\u6709\u4efb\u4f55\u7248\u672c\u4fe1\u606f\u8fd4\u56de\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002<\/p>\n<p><strong>\u5982\u679c\u627e\u4e0d\u5230Python\uff0c\u5e94\u8be5\u5982\u4f55\u5b89\u88c5\uff1f<\/strong><br \/>\u5982\u679c\u7cfb\u7edf\u63d0\u793a\u672a\u627e\u5230Python\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u786e\u4fdd\u52fe\u9009\u201c\u5c06Python\u6dfb\u52a0\u5230PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u8f7b\u677e\u8bbf\u95eePython\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u68c0\u67e5Python\u662f\u5426\u5b89\u88c5\uff1f<\/strong><br \/>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u6253\u5f00\u7ec8\u7aef\u5e76\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u3002\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u901a\u5e38\u4f1a\u9884\u88c5Python\u3002\u5982\u679c\u6ca1\u6709\u8fd4\u56de\u7248\u672c\u4fe1\u606f\uff0c\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\uff08\u5982<code>apt<\/code>\u6216<code>yum<\/code>\uff09\u6765\u5b89\u88c5Python\uff0c\u4f8b\u5982\u4f7f\u7528\u547d\u4ee4<code>sudo apt install python3<\/code>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5224\u65adPython\u662f\u5426\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u68c0\u67e5\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4\u3001\u67e5\u770b\u7279\u5b9a\u76ee\u5f55\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u6307\u4ee4 [&hellip;]","protected":false},"author":3,"featured_media":982570,"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\/982561"}],"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=982561"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/982561\/revisions"}],"predecessor-version":[{"id":982572,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/982561\/revisions\/982572"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/982570"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=982561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=982561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=982561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}