{"id":958326,"date":"2024-12-27T03:23:00","date_gmt":"2024-12-26T19:23:00","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/958326.html"},"modified":"2024-12-27T03:23:03","modified_gmt":"2024-12-26T19:23:03","slug":"python%e5%ae%89%e8%a3%85%e5%90%8e%e5%a6%82%e4%bd%95%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/958326.html","title":{"rendered":"python\u5b89\u88c5\u540e\u5982\u4f55\u6d4b\u8bd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25101346\/d5066b2c-be30-4c59-b234-bd0faec2a1ca.webp\" alt=\"python\u5b89\u88c5\u540e\u5982\u4f55\u6d4b\u8bd5\" \/><\/p>\n<p><p> <strong>\u5728Python\u5b89\u88c5\u540e\uff0c\u6d4b\u8bd5\u5176\u662f\u5426\u6210\u529f\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165<code>python --version<\/code>\u67e5\u770bPython\u7248\u672c\u3001\u8fd0\u884c\u7b80\u5355\u7684Python\u811a\u672c\u3001\u4f7f\u7528Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3002\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u5feb\u901f\u9a8c\u8bc1Python\u5b89\u88c5\u662f\u5426\u6b63\u786e\uff0c\u5e76\u786e\u4fdd\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65e0\u8bef\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u9a8c\u8bc1Python\u7248\u672c<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u540e\uff0c\u7b2c\u4e00\u6b65\u901a\u5e38\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u6253\u5f00\u7ec8\u7aef\uff08Linux\u6216Mac\uff09\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\uff0c\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<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679cPython\u5b89\u88c5\u6210\u529f\uff0c\u8be5\u547d\u4ee4\u5c06\u663e\u793a\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code>Python 3.8.5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u662f\u6700\u76f4\u63a5\u548c\u5feb\u901f\u7684\u9a8c\u8bc1\u65b9\u5f0f<\/strong>\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u786e\u8ba4Python\u662f\u5426\u5df2\u5b89\u88c5\uff0c\u8fd8\u53ef\u4ee5\u68c0\u67e5\u5b89\u88c5\u7684\u5177\u4f53\u7248\u672c\u3002\u8fd9\u5bf9\u4e8e\u540e\u7eed\u4f7f\u7528Python\u8fdb\u884c\u5f00\u53d1\u6216\u5b89\u88c5\u4f9d\u8d56\u5305\u65f6\uff0c\u786e\u4fdd\u7248\u672c\u517c\u5bb9\u6027\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u8fd0\u884c\u7b80\u5355\u7684Python\u811a\u672c<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u8fdb\u4e00\u6b65\u6d4b\u8bd5Python\u662f\u5426\u5b89\u88c5\u6210\u529f\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u8fd0\u884c\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\u3002\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>test.py<\/code>\u7684\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, Python!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u8be5\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python test.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 test.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u8f93\u51fa<code>Hello, Python!<\/code>\uff0c\u8bf4\u660ePython\u73af\u5883\u5df2\u7ecf\u6b63\u786e\u914d\u7f6e\uff0c\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884cPython\u811a\u672c\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u9a8c\u8bc1\u4e86Python\u7684\u5b89\u88c5\uff0c\u8fd8\u786e\u4fdd\u4e86\u6587\u4ef6\u8def\u5f84\u548c\u6743\u9650\u8bbe\u7f6e\u6b63\u786e\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>Python\u7684\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u5728\u8f93\u5165\u547d\u4ee4\u540e\u7acb\u5373\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u3002\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\u6765\u542f\u52a8\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fdb\u5165\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u540e\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165\u7b80\u5355\u7684Python\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">&gt;&gt;&gt; print(&quot;Python is working!&quot;)<\/p>\n<p>Python is working!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e0d\u4ec5\u6709\u52a9\u4e8e\u9a8c\u8bc1Python\u5b89\u88c5\uff0c\u8fd8\u4e3a\u5b66\u4e60\u548c\u6d4b\u8bd5Python\u4ee3\u7801\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u7684\u73af\u5883\u3002\u7279\u522b\u662f\u5728\u8c03\u8bd5\u6216\u5b66\u4e60\u65b0\u8bed\u6cd5\u65f6\uff0c\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u7684\u5373\u65f6\u53cd\u9988\u529f\u80fd\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u786e\u4fdd\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6b63\u786e<\/p>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u5b89\u88c5Python\u540e\u9700\u8981\u786e\u4fdd\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6b63\u786e\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u901a\u5e38\u4f1a\u6709\u4e00\u4e2a\u9009\u9879\u201cAdd Python to PATH\u201d\uff0c\u786e\u4fdd\u9009\u4e2d\u6b64\u9009\u9879\u3002\u5982\u679c\u5728\u5b89\u88c5\u540e\u53d1\u73b0\u65e0\u6cd5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u4f7f\u7528<code>python<\/code>\u547d\u4ee4\uff0c\u5219\u9700\u8981\u624b\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u5355\u51fb\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\u5e76\u7f16\u8f91\u201cPath\u201d\u53d8\u91cf\u3002<\/li>\n<li>\u6dfb\u52a0Python\u5b89\u88c5\u76ee\u5f55\u548cScripts\u76ee\u5f55\uff08\u4f8b\u5982\uff0c<code>C:\\Python39<\/code>\u548c<code>C:\\Python39\\Scripts\\<\/code>\uff09\u3002<\/li>\n<\/ol>\n<p><p>\u6b63\u786e\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u53ef\u4ee5\u786e\u4fdd\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u90fd\u80fd\u4f7f\u7528Python\u547d\u4ee4\uff0c\u8fd9\u5bf9\u4e8e\u5728\u4e0d\u540c\u9879\u76ee\u4e2d\u4f7f\u7528Python\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u68c0\u67e5Python\u5305\u7ba1\u7406\u5668pip<\/p>\n<\/p>\n<p><p>Python\u7684\u5305\u7ba1\u7406\u5668pip\u662f\u4e00\u4e2a\u91cd\u8981\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u8f6f\u4ef6\u5305\u3002\u901a\u5e38\uff0cPython\u5b89\u88c5\u5305\u4f1a\u9644\u5e26pip\uff0c\u4f46\u9700\u8981\u9a8c\u8bc1\u5176\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770bpip\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u7c7b\u4f3c\u4e8e\uff1a<\/p>\n<\/p>\n<p><pre><code>pip 20.2.3 from \/usr\/lib\/python3.8\/site-packages\/pip (python 3.8)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679cpip\u5de5\u4f5c\u6b63\u5e38\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u5b89\u88c5\u4e00\u4e2a\u7b80\u5355\u7684\u5305\uff0c\u4f8b\u5982requests\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>print(requests.__version__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>pip\u7684\u6b63\u5e38\u5de5\u4f5c\u5bf9\u4e8ePython\u5f00\u53d1\u6765\u8bf4\u81f3\u5173\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u5141\u8bb8\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\u548c\u5de5\u5177\uff0c\u6269\u5c55\u4e86Python\u7684\u529f\u80fd\u548c\u5e94\u7528\u8303\u56f4\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u8de8\u5e73\u53f0\u6ce8\u610f\u4e8b\u9879<\/p>\n<\/p>\n<p><p>\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u5bf9Python\u7684\u652f\u6301\u548c\u914d\u7f6e\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u8de8\u5e73\u53f0\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Windows<\/strong>\uff1a\u786e\u4fdd\u5b89\u88c5\u65f6\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u5e76\u68c0\u67e5Python\u7684\u5b89\u88c5\u76ee\u5f55\u548cScripts\u76ee\u5f55\u662f\u5426\u5728\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/li>\n<li><strong>Mac<\/strong>\uff1amacOS\u901a\u5e38\u9884\u88c5\u4e86Python 2.x\u7248\u672c\u3002\u5efa\u8bae\u4f7f\u7528Homebrew\u5b89\u88c5Python 3.x\u7248\u672c\uff0c\u5e76\u901a\u8fc7<code>brew install python3<\/code>\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<li><strong>Linux<\/strong>\uff1a\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u90fd\u9884\u88c5\u4e86Python\uff0c\u4f46\u53ef\u80fd\u4e0d\u662f\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\uff08\u5982apt\u3001yum\uff09\u5b89\u88c5\u6216\u5347\u7ea7\u5230\u6700\u65b0\u7684Python\u7248\u672c\u3002<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u547d\u4ee4\u884c\u6d4b\u8bd5Python\u5916\uff0c\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u5982PyCharm\u3001VSCode\u3001Jupyter Notebook\u7b49\uff0c\u53ef\u4ee5\u63d0\u4f9b\u66f4\u5f3a\u5927\u7684\u5f00\u53d1\u548c\u8c03\u8bd5\u529f\u80fd\u3002\u8fd9\u4e9bIDE\u901a\u5e38\u4f1a\u81ea\u52a8\u68c0\u6d4bPython\u5b89\u88c5\uff0c\u5e76\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>PyCharm<\/strong>\uff1a\u5b89\u88c5\u540e\u542f\u52a8PyCharm\uff0c\u521b\u5efa\u65b0\u9879\u76ee\u65f6\uff0c\u9009\u62e9Python\u89e3\u91ca\u5668\uff0cPyCharm\u4f1a\u81ea\u52a8\u68c0\u6d4b\u7cfb\u7edf\u4e2d\u7684Python\u5b89\u88c5\u3002<\/li>\n<li><strong>VSCode<\/strong>\uff1a\u5b89\u88c5Python\u6269\u5c55\u540e\uff0cVSCode\u4f1a\u81ea\u52a8\u63d0\u4f9bPython\u76f8\u5173\u7684\u529f\u80fd\u652f\u6301\u3002<\/li>\n<li><strong>Jupyter Notebook<\/strong>\uff1a\u901a\u8fc7pip\u5b89\u88c5Jupyter\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4<code>jupyter notebook<\/code>\u542f\u52a8\uff0c\u5e76\u5728\u6d4f\u89c8\u5668\u4e2d\u8fdb\u884cPython\u5f00\u53d1\u3002<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528IDE\u4e0d\u4ec5\u80fd\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u8fd8\u80fd\u5e2e\u52a9\u65b0\u624b\u66f4\u5feb\u5730\u638c\u63e1Python\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u547d\u4ee4\u884c\u9a8c\u8bc1Python\u7248\u672c\u3001\u8fd0\u884c\u7b80\u5355\u811a\u672c\u3001\u4f7f\u7528\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3001\u786e\u4fdd\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6b63\u786e\u3001\u68c0\u67e5pip\u4ee5\u53ca\u8de8\u5e73\u53f0\u6ce8\u610f\u4e8b\u9879\uff0c\u4ee5\u4e0a\u6b65\u9aa4\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5728Python\u5b89\u88c5\u540e\u8fdb\u884c\u5168\u9762\u6d4b\u8bd5\uff0c\u786e\u4fdd\u73af\u5883\u914d\u7f6e\u65e0\u8bef\u3002\u8fd9\u4e3a\u540e\u7eed\u7684Python\u5f00\u53d1\u548c\u5b66\u4e60\u5960\u5b9a\u4e86\u575a\u5b9e\u7684\u57fa\u7840\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9a8c\u8bc1\u6211\u7684Python\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u9a8c\u8bc1Python\u5b89\u88c5\u662f\u5426\u6210\u529f\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u68c0\u67e5\u7248\u672c\u53f7\u3002\u5982\u679c\u7cfb\u7edf\u8fd4\u56de\u4e86Python\u7684\u7248\u672c\u4fe1\u606f\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u60a8\u8fd8\u53ef\u4ee5\u6253\u5f00Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\uff0c\u8f93\u5165<code>print(&quot;Hello, World!&quot;)<\/code>\u5e76\u67e5\u770b\u662f\u5426\u80fd\u591f\u6b63\u5e38\u8f93\u51fa\u3002<\/p>\n<p><strong>\u5728Windows\u548cMac\u4e0a\u6d4b\u8bd5Python\u5b89\u88c5\u6709\u4ec0\u4e48\u4e0d\u540c\u5417\uff1f<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u8fdb\u884c\u6d4b\u8bd5\uff0c\u800c\u5728Mac\u4e0a\uff0c\u5219\u901a\u5e38\u4f7f\u7528\u7ec8\u7aef\u3002\u65e0\u8bba\u5728\u54ea\u4e2a\u5e73\u53f0\uff0c\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\u90fd\u53ef\u4ee5\u8fdb\u5165Python\u4ea4\u4e92\u5f0f\u73af\u5883\uff0c\u8fdb\u884c\u4ee3\u7801\u6d4b\u8bd5\u3002\u786e\u4fdd\u5728\u5b89\u88c5\u65f6\u9009\u62e9\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbf\u5728\u4efb\u4f55\u547d\u4ee4\u884c\u7a97\u53e3\u4e2d\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u8fd0\u884c\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\u6765\u6d4b\u8bd5\u5b89\u88c5\uff1f<\/strong><br \/>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u672c\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a<code>test.py<\/code>\u3002\u5728\u6587\u4ef6\u4e2d\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">print(&quot;Python is installed and working!&quot;)\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u8be5\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165<code>python test.py<\/code>\u6216<code>python3 test.py<\/code>\u6765\u8fd0\u884c\u3002\u5982\u679c\u770b\u5230\u201cPython is installed and working!\u201d\u7684\u8f93\u51fa\uff0c\u8bf4\u660e\u60a8\u7684Python\u73af\u5883\u914d\u7f6e\u6b63\u786e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u5b89\u88c5\u540e\uff0c\u6d4b\u8bd5\u5176\u662f\u5426\u6210\u529f\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165python &#8211;version\u67e5\u770b [&hellip;]","protected":false},"author":3,"featured_media":958328,"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\/958326"}],"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=958326"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/958326\/revisions"}],"predecessor-version":[{"id":958329,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/958326\/revisions\/958329"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/958328"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=958326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=958326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=958326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}