{"id":962518,"date":"2024-12-27T04:09:01","date_gmt":"2024-12-26T20:09:01","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/962518.html"},"modified":"2024-12-27T04:09:03","modified_gmt":"2024-12-26T20:09:03","slug":"python8%e5%a6%82%e4%bd%95%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/962518.html","title":{"rendered":"python8\u5982\u4f55\u542f\u52a8"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25104444\/4dac48a4-d93f-4d8e-9231-9008771143e9.webp\" alt=\"python8\u5982\u4f55\u542f\u52a8\" \/><\/p>\n<p><p> <strong>Python 8\u5c1a\u672a\u53d1\u5e03\uff0c\u56e0\u6b64\u65e0\u6cd5\u542f\u52a8\u3001Python\u7684\u542f\u52a8\u65b9\u5f0f\u901a\u5e38\u5305\u62ec\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u8fd0\u884cPython\u811a\u672c\u3002<\/strong> \u5728\u8fd9\u5176\u4e2d\uff0c\u201c\u5b89\u88c5Python\u89e3\u91ca\u5668\u201d\u662f\u6700\u4e3a\u5173\u952e\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u5b83\u662f\u4f7f\u7528Python\u7684\u524d\u63d0\u6761\u4ef6\u3002\u4ee5\u4e0b\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u89e3\u91ca\u5668\u662f\u4f7f\u7528Python\u7684\u7b2c\u4e00\u6b65\u3002\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7Python\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u7684Python\u7248\u672c\uff0c\u7136\u540e\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u9009\u62e9\u6dfb\u52a0Python\u5230\u7cfb\u7edf\u7684PATH\u73af\u5883\u53d8\u91cf\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528\u201cpython\u201d\u547d\u4ee4\u6765\u8fd0\u884cPython\u7a0b\u5e8f\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165\u201cpython &#8211;version\u201d\u6765\u68c0\u67e5Python\u5b89\u88c5\u662f\u5426\u6210\u529f\u4ee5\u53ca\u5b89\u88c5\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001\u5b89\u88c5Python\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\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%E9%80%89%E6%8B%A9%E9%80%82%E5%90%88%E8%87%AA%E5%B7%B1%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84Python%E7%89%88%E6%9C%AC%E8%BF%9B%E8%A1%8C%E4%B8%8B%E8%BD%BD%E3%80%82%E5%AF%B9%E4%BA%8E%E5%A4%A7%E5%A4%9A%E6%95%B0%E7%94%A8%E6%88%B7%E6%9D%A5%E8%AF%B4%EF%BC%8C%E9%80%89%E6%8B%A9%E6%9C%80%E6%96%B0%E7%9A%84%E7%A8%B3%E5%AE%9A%E7%89%88%E6%9C%AC%E6%98%AF%E6%9C%80%E5%90%88%E9%80%82%E7%9A%84%E3%80%82\">https:\/\/www.python.org\/\uff09\uff0c\u5728\u4e0b\u8f7d\u9875\u9762\u4e2d\u9009\u62e9\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\u6765\u8bf4\uff0c\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u662f\u6700\u5408\u9002\u7684\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\u4f1a\u6709\u4e00\u4e2a\u9009\u9879\u662f\u201cAdd Python to PATH\u201d\uff0c\u5efa\u8bae\u52fe\u9009\u8fd9\u4e2a\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5Python\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793a\u51fa\u4f60\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u5982\u679c\u663e\u793a\u51fa\u7248\u672c\u53f7\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u5982\u679c\u5728\u5b89\u88c5Python\u65f6\u6ca1\u6709\u9009\u62e9\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u90a3\u4e48\u53ef\u4ee5\u624b\u52a8\u8fdb\u884c\u914d\u7f6e\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53f3\u952e\u70b9\u51fb\u201c\u6211\u7684\u7535\u8111\u201d\u6216\u201c\u6b64\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002<\/p>\n<\/p>\n<p><p>\u5728\u201c\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u627e\u5230\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u7684\u201cPath\u201d\u53d8\u91cf\uff0c\u9009\u62e9\u5b83\u5e76\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002\u5728\u201c\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u65b0\u5efa\u201d\uff0c\u7136\u540e\u8f93\u5165Python\u5b89\u88c5\u8def\u5f84\uff0c\u4f8b\u5982\u201cC:\\Python39\\\u201d\u3002\u6ce8\u610f\uff0c\u8fd9\u4e2a\u8def\u5f84\u662fPython\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u53ef\u80fd\u56e0\u7248\u672c\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b8c\u6210\u73af\u5883\u53d8\u91cf\u7684\u914d\u7f6e\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201cpython\u201d\u547d\u4ee4\u3002\u5982\u679c\u51fa\u73b0Python\u89e3\u91ca\u5668\u7684\u63d0\u793a\u7b26\uff0c\u8bf4\u660e\u914d\u7f6e\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u8fd0\u884cPython\u811a\u672c<\/p>\n<\/p>\n<p><p>\u5728\u5b8c\u6210Python\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u540e\uff0c\u53ef\u4ee5\u5f00\u59cb\u8fd0\u884cPython\u811a\u672c\u3002Python\u811a\u672c\u901a\u5e38\u4ee5\u201c.py\u201d\u4f5c\u4e3a\u6587\u4ef6\u6269\u5c55\u540d\u3002\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884cPython\u811a\u672c\uff0c\u5177\u4f53\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c\u201cscript.py\u201d\u662fPython\u811a\u672c\u7684\u6587\u4ef6\u540d\u3002\u6267\u884c\u8be5\u547d\u4ee4\u540e\uff0cPython\u89e3\u91ca\u5668\u4f1a\u9010\u884c\u6267\u884c\u811a\u672c\u4e2d\u7684\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u6b64\u5916\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\uff0c\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165Python\u4ee3\u7801\u5e76\u7acb\u5373\u6267\u884c\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpython\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u5373\u53ef\u8fdb\u5165\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u6a21\u5f0f\u3002\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e0b\uff0c\u53ef\u4ee5\u8f93\u5165\u4efb\u610fPython\u4ee3\u7801\u5e76\u67e5\u770b\u5176\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5b89\u88c5Python\u5305\u548c\u6a21\u5757<\/p>\n<\/p>\n<p><p>Python\u7684\u4e00\u4e2a\u663e\u8457\u4f18\u70b9\u662f\u5176\u5e9e\u5927\u7684\u7b2c\u4e09\u65b9\u5e93\u548c\u6a21\u5757\u751f\u6001\u7cfb\u7edf\u3002\u901a\u8fc7Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b89\u88c5\u5404\u79cd\u7b2c\u4e09\u65b9\u5e93\u548c\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5Python\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install package-name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c\u201cpackage-name\u201d\u662f\u4f60\u60f3\u5b89\u88c5\u7684Python\u5305\u7684\u540d\u79f0\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5NumPy\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u201cpip install numpy\u201d\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u901a\u8fc7\u201cimport\u201d\u8bed\u53e5\u6765\u4f7f\u7528\u8fd9\u4e9b\u5e93\u548c\u6a21\u5757\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\uff0c\u5c31\u53ef\u4ee5\u5728Python\u4ee3\u7801\u4e2d\u4f7f\u7528NumPy\u5e93\u63d0\u4f9b\u7684\u5404\u79cd\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f7f\u7528Python IDE\u8fdb\u884c\u5f00\u53d1<\/p>\n<\/p>\n<p><p>\u867d\u7136\u53ef\u4ee5\u901a\u8fc7\u6587\u672c\u7f16\u8f91\u5668\u548c\u547d\u4ee4\u884c\u6765\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4f46\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u5e38\u7528\u7684Python IDE\u6709PyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u4ee5PyCharm\u4e3a\u4f8b\uff0c\u5b89\u88c5PyCharm\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u9879\u76ee\uff0c\u5e76\u5728\u9879\u76ee\u4e2d\u521b\u5efaPython\u811a\u672c\u6587\u4ef6\u3002\u5728PyCharm\u4e2d\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7f16\u5199\u3001\u8c03\u8bd5\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u6b64\u5916\uff0cPyCharm\u8fd8\u63d0\u4f9b\u4e86\u4ee3\u7801\u8865\u5168\u3001\u8bed\u6cd5\u68c0\u67e5\u7b49\u529f\u80fd\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528IDE\u8fdb\u884c\u5f00\u53d1\u65f6\uff0c\u4e5f\u9700\u8981\u786e\u4fddPython\u89e3\u91ca\u5668\u5df2\u6b63\u786e\u914d\u7f6e\u3002\u5728PyCharm\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u201cFile\u201d\u83dc\u5355\u4e2d\u7684\u201cSettings\u201d\u9009\u9879\u6765\u914d\u7f6ePython\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u66f4\u65b0\u548c\u7ef4\u62a4Python\u73af\u5883<\/p>\n<\/p>\n<p><p>Python\u548c\u5176\u7b2c\u4e09\u65b9\u5e93\u4f1a\u4e0d\u65ad\u66f4\u65b0\uff0c\u56e0\u6b64\u9700\u8981\u5b9a\u671f\u66f4\u65b0Python\u73af\u5883\u4ee5\u4f7f\u7528\u6700\u65b0\u7684\u529f\u80fd\u548c\u4fee\u590d\u5df2\u77e5\u95ee\u9898\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0pip\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m pip install --upgrade pip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u5916\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0\u5df2\u5b89\u88c5\u7684Python\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade package-name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b9a\u671f\u68c0\u67e5Python\u5b98\u65b9\u7f51\u7ad9\u548c\u5e38\u7528\u5e93\u7684\u66f4\u65b0\u65e5\u5fd7\uff0c\u4e86\u89e3\u65b0\u7248\u672c\u7684\u529f\u80fd\u548c\u4fee\u590d\u5185\u5bb9\uff0c\u4ee5\u4fbf\u53ca\u65f6\u66f4\u65b0\u548c\u7ef4\u62a4Python\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528Python\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4f8b\u5982\uff0cPython\u7248\u672c\u4e0d\u517c\u5bb9\u3001\u7f3a\u5c11\u5fc5\u8981\u7684\u7b2c\u4e09\u65b9\u5e93\u3001\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u9519\u8bef\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u9047\u5230\u8fd9\u4e9b\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u67e5\u9605Python\u7684\u5b98\u65b9\u6587\u6863\u3001\u641c\u7d22\u76f8\u5173\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u6216\u5728Python\u793e\u533a\u4e2d\u5bfb\u6c42\u5e2e\u52a9\u6765\u89e3\u51b3\u3002\u6b64\u5916\uff0c\u826f\u597d\u7684\u7f16\u7a0b\u4e60\u60ef\u548c\u95ee\u9898\u6392\u67e5\u80fd\u529b\u4e5f\u662f\u89e3\u51b3\u95ee\u9898\u7684\u91cd\u8981\u56e0\u7d20\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u5b66\u4e60\u548c\u638c\u63e1Python<\/p>\n<\/p>\n<p><p>Python\u662f\u4e00\u95e8\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u5b66\u4e60\u7684\u7f16\u7a0b\u8bed\u8a00\u3002\u8981\u719f\u7ec3\u638c\u63e1Python\uff0c\u9700\u8981\u4e0d\u65ad\u5b66\u4e60\u548c\u5b9e\u8df5\u3002\u53ef\u4ee5\u901a\u8fc7\u9605\u8bfbPython\u76f8\u5173\u7684\u4e66\u7c4d\u3001\u53c2\u52a0\u5728\u7ebf\u8bfe\u7a0b\u3001\u53c2\u4e0e\u5f00\u6e90\u9879\u76ee\u7b49\u65b9\u5f0f\u6765\u63d0\u9ad8\u81ea\u5df1\u7684Python\u7f16\u7a0b\u6c34\u5e73\u3002<\/p>\n<\/p>\n<p><p>\u6b64\u5916\uff0c\u52a0\u5165Python\u793e\u533a\u548c\u53c2\u4e0e\u6280\u672f\u4ea4\u6d41\u4e5f\u662f\u63d0\u9ad8\u7f16\u7a0b\u80fd\u529b\u7684\u6709\u6548\u9014\u5f84\u3002\u901a\u8fc7\u4e0e\u5176\u4ed6\u5f00\u53d1\u8005\u4ea4\u6d41\u7ecf\u9a8c\u548c\u5206\u4eab\u77e5\u8bc6\uff0c\u53ef\u4ee5\u66f4\u5feb\u5730\u638c\u63e1Python\u7684\u4f7f\u7528\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6211\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python 8\uff1f<\/strong><br \/>\u8981\u5b89\u88c5Python 8\uff0c\u9996\u5148\u9700\u8981\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\uff0c\u627e\u5230\u9002\u7528\u4e8e\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u4e0b\u8f7d\u540e\uff0c\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u7684\u6307\u793a\u8fdb\u884c\u5b89\u88c5\uff0c\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u4e2d\u201cAdd Python to PATH\u201d\u9009\u9879\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>python --version<\/code>\u6765\u786e\u8ba4\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<p><strong>\u5728Python 8\u4e2d\u5982\u4f55\u521b\u5efa\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\uff1f<\/strong><br \/>\u521b\u5efa\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u3002\u5728\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u60a8\u7684IDE\uff08\u5982PyCharm\u6216VSCode\uff09\u6216\u6587\u672c\u7f16\u8f91\u5668\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u547d\u540d\u4e3a<code>hello.py<\/code>\u3002\u5728\u6587\u4ef6\u4e2d\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<code>print(&quot;Hello, World!&quot;)<\/code>\u3002\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u8f93\u5165<code>python hello.py<\/code>\u6765\u8fd0\u884c\u7a0b\u5e8f\uff0c\u60a8\u5c06\u770b\u5230\u8f93\u51fa\u201cHello, World!\u201d\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python 8\u4e2d\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\uff1f<\/strong><br \/>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u9700\u8981\u501f\u52a9\u5305\u7ba1\u7406\u5de5\u5177pip\u3002\u786e\u8ba4pip\u5df2\u968fPython 8\u5b89\u88c5\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u754c\u9762\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165<code>pip install package_name<\/code>\u6765\u5b89\u88c5\u6240\u9700\u7684\u5e93\uff0c\u5c06<code>package_name<\/code>\u66ff\u6362\u4e3a\u5177\u4f53\u7684\u5e93\u540d\u3002\u4f8b\u5982\uff0c\u5b89\u88c5\u8bf7\u6c42\u5e93\u53ef\u4ee5\u4f7f\u7528<code>pip install requests<\/code>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u5bfc\u5165\u8be5\u5e93\u5e76\u5f00\u59cb\u4f7f\u7528\u5b83\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python 8\u5c1a\u672a\u53d1\u5e03\uff0c\u56e0\u6b64\u65e0\u6cd5\u542f\u52a8\u3001Python\u7684\u542f\u52a8\u65b9\u5f0f\u901a\u5e38\u5305\u62ec\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u8fd0 [&hellip;]","protected":false},"author":3,"featured_media":962523,"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\/962518"}],"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=962518"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/962518\/revisions"}],"predecessor-version":[{"id":962525,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/962518\/revisions\/962525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/962523"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=962518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=962518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=962518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}