{"id":921844,"date":"2024-12-26T14:21:03","date_gmt":"2024-12-26T06:21:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/921844.html"},"modified":"2024-12-26T14:21:05","modified_gmt":"2024-12-26T06:21:05","slug":"python-%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/921844.html","title":{"rendered":"python \u5982\u4f55\u8fd0\u884c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210626\/4bf2c95e-723f-4d91-998b-4fc1258ecff9.webp\" alt=\"python \u5982\u4f55\u8fd0\u884c\" \/><\/p>\n<p><p> <strong>\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u9009\u62e9\u5408\u9002\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u4ee3\u7801\u7f16\u8f91\u5668\u3001\u7f16\u5199Python\u4ee3\u7801\u6587\u4ef6\uff0c\u6700\u540e\u901a\u8fc7\u547d\u4ee4\u884c\u6216IDE\u8fd0\u884c\u4ee3\u7801\u3002<\/strong> Python\u662f\u4e00\u79cd\u5e7f\u6cdb\u4f7f\u7528\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u4ee5\u5176\u7b80\u5355\u6613\u5b66\u7684\u8bed\u6cd5\u548c\u5f3a\u5927\u7684\u529f\u80fd\u800c\u95fb\u540d\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u6765\u63d0\u9ad8\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5Python\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u7a0b\u5e8f\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002Python\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u63d0\u4f9b\u4e86\u6700\u65b0\u7248\u672c\u7684Python\u4e0b\u8f7d\u3002\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u786e\u4fdd\u9009\u4e2d&quot;Add Python to PATH&quot;\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u8f7b\u677e\u8bbf\u95eePython\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u9009\u62e9\u5408\u9002\u7684IDE\u6216\u4ee3\u7801\u7f16\u8f91\u5668<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u4ee3\u7801\u7f16\u8f91\u5668\u5bf9\u4e8e\u7f16\u5199\u548c\u8fd0\u884cPython\u7a0b\u5e8f\u975e\u5e38\u91cd\u8981\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6d41\u884c\u7684IDE\u548c\u7f16\u8f91\u5668\u9009\u9879\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>PyCharm<\/strong><br \/>PyCharm\u662fJetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u516c\u53f8\u5f00\u53d1\u7684\u4e13\u4e1aPython IDE\uff0c\u529f\u80fd\u5f3a\u5927\uff0c\u652f\u6301\u8c03\u8bd5\u3001\u4ee3\u7801\u8865\u5168\u548c\u7248\u672c\u63a7\u5236\u7b49\u529f\u80fd\u3002\u5bf9\u4e8e\u5927\u578b\u9879\u76ee\u548c\u4e13\u4e1a\u5f00\u53d1\u8005\u6765\u8bf4\uff0cPyCharm\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Visual Studio Code (VS Code)<\/strong><br \/>VS Code\u662f\u5fae\u8f6f\u5f00\u53d1\u7684\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u901a\u8fc7\u5b89\u88c5Python\u6269\u5c55\uff0cVS Code\u53ef\u4ee5\u63d0\u4f9b\u7c7b\u4f3cIDE\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Jupyter Notebook<\/strong><br \/>Jupyter Notebook\u662f\u4e00\u79cd\u4ea4\u4e92\u5f0f\u7684Web\u5e94\u7528\u7a0b\u5e8f\uff0c\u9002\u5408\u7528\u4e8e\u6570\u636e\u5206\u6790\u548c\u79d1\u5b66\u8ba1\u7b97\u3002\u5b83\u5141\u8bb8\u7528\u6237\u5728\u6d4f\u89c8\u5668\u4e2d\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u5e76\u5b9e\u65f6\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Sublime Text<\/strong><br \/>Sublime Text\u662f\u4e00\u6b3e\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u8f7b\u91cf\u7ea7\u4e14\u901f\u5ea6\u5feb\u3002\u901a\u8fc7\u5b89\u88c5\u76f8\u5e94\u7684\u63d2\u4ef6\uff0c\u53ef\u4ee5\u83b7\u5f97\u5bf9Python\u4ee3\u7801\u7684\u652f\u6301\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u7f16\u5199Python\u4ee3\u7801\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5728\u9009\u62e9\u597dIDE\u6216\u7f16\u8f91\u5668\u540e\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u7f16\u5199Python\u4ee3\u7801\u6587\u4ef6\u3002Python\u6587\u4ef6\u4ee5\u201c.py\u201d\u4f5c\u4e3a\u6269\u5c55\u540d\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Python\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># hello.py<\/p>\n<p>print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06\u4e0a\u9762\u7684\u4ee3\u7801\u4fdd\u5b58\u4e3a\u201chello.py\u201d\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884cPython\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884cPython\u4ee3\u7801\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08macOS\u548cLinux\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5bfc\u822a\u5230\u5305\u542bPython\u6587\u4ef6\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6587\u4ef6\u4f4d\u4e8e\u684c\u9762\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd Desktop<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u884cPython\u6587\u4ef6\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u5982\u679cPython\u5b89\u88c5\u6b63\u786e\u5e76\u4e14\u8def\u5f84\u8bbe\u7f6e\u65e0\u8bef\uff0c\u547d\u4ee4\u884c\u5c06\u8f93\u51fa\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u901a\u8fc7IDE\u8fd0\u884cPython\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>\u5927\u591a\u6570IDE\u90fd\u63d0\u4f9b\u4e86\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u529f\u80fd\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00IDE\u5e76\u52a0\u8f7dPython\u6587\u4ef6\u3002<\/li>\n<li>\u5728\u83dc\u5355\u680f\u4e2d\u627e\u5230\u201c\u8fd0\u884c\u201d\u9009\u9879\uff0c\u70b9\u51fb\u4ee5\u8fd0\u884c\u4ee3\u7801\u3002<\/li>\n<li>\u89c2\u5bdf\u8f93\u51fa\u7a97\u53e3\u4ee5\u67e5\u770b\u7a0b\u5e8f\u7684\u6267\u884c\u7ed3\u679c\u3002<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56\u662f\u4e00\u4e2a\u6700\u4f73\u5b9e\u8df5\u3002\u865a\u62df\u73af\u5883\u5141\u8bb8\u6bcf\u4e2a\u9879\u76ee\u62e5\u6709\u72ec\u7acb\u7684Python\u7248\u672c\u548c\u4f9d\u8d56\u5e93\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><br \/>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cmyenv\u201d\u7684\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56<\/strong><br \/>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u547d\u4ee4\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5e93\u3002\u4f8b\u5982\uff1a<\/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>\u9000\u51fa\u865a\u62df\u73af\u5883<\/strong><br \/>\u5f53\u4e0d\u518d\u9700\u8981\u865a\u62df\u73af\u5883\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9000\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u8c03\u8bd5\u548c\u4f18\u5316Python\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u5728\u7f16\u5199\u548c\u8fd0\u884cPython\u7a0b\u5e8f\u65f6\uff0c\u8c03\u8bd5\u548c\u4f18\u5316\u4ee3\u7801\u662f\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6709\u7528\u7684\u6280\u5de7\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177<\/strong><br \/>\u5927\u591a\u6570IDE\u90fd\u5185\u7f6e\u4e86\u8c03\u8bd5\u5de5\u5177\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u9010\u6b65\u6267\u884c\u4ee3\u7801\u3001\u8bbe\u7f6e\u65ad\u70b9\u548c\u68c0\u67e5\u53d8\u91cf\u503c\u3002\u8fd9\u53ef\u4ee5\u5e2e\u52a9\u5feb\u901f\u5b9a\u4f4d\u548c\u4fee\u590d\u9519\u8bef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u5206\u6790\u5de5\u5177<\/strong><br \/>\u4f7f\u7528\u4ee3\u7801\u5206\u6790\u5de5\u5177\uff08\u5982Pylint\u3001Flake8\uff09\u68c0\u67e5\u4ee3\u7801\u98ce\u683c\u548c\u8d28\u91cf\uff0c\u786e\u4fdd\u9075\u5faaPython\u7684\u7f16\u7801\u6807\u51c6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u4f18\u5316<\/strong><br \/>\u4f7f\u7528<code>cProfile<\/code>\u6a21\u5757\u5206\u6790\u4ee3\u7801\u6027\u80fd\uff0c\u8bc6\u522b\u6027\u80fd\u74f6\u9888\u3002\u4f18\u5316\u5faa\u73af\u548c\u7b97\u6cd5\uff0c\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516b\u3001\u5b66\u4e60\u548c\u638c\u63e1Python\u7684\u9ad8\u7ea7\u7279\u6027<\/p>\n<\/p>\n<p><p>\u638c\u63e1Python\u7684\u9ad8\u7ea7\u7279\u6027\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u7f16\u5199\u66f4\u9ad8\u6548\u548c\u53ef\u7ef4\u62a4\u7684\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u9700\u8981\u5b66\u4e60\u7684\u9ad8\u7ea7\u7279\u6027\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09<\/strong><br \/>\u5b66\u4e60\u5982\u4f55\u4f7f\u7528\u7c7b\u548c\u5bf9\u8c61\u7ec4\u7ec7\u4ee3\u7801\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u91cd\u7528\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u88c5\u9970\u5668\u548c\u751f\u6210\u5668<\/strong><br \/>\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u88c5\u9970\u5668\u548c\u751f\u6210\u5668\u7b80\u5316\u4ee3\u7801\u903b\u8f91\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5f02\u6b65\u7f16\u7a0b<\/strong><br \/>\u5f02\u6b65\u7f16\u7a0b\u5141\u8bb8\u7a0b\u5e8f\u5728\u7b49\u5f85I\/O\u64cd\u4f5c\u65f6\u6267\u884c\u5176\u4ed6\u4efb\u52a1\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u54cd\u5e94\u80fd\u529b\u3002\u5b66\u4e60\u5982\u4f55\u4f7f\u7528<code>asyncio<\/code>\u5e93\u5b9e\u73b0\u5f02\u6b65\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u6280\u5de7\uff0c\u60a8\u53ef\u4ee5\u9ad8\u6548\u5730\u7f16\u5199\u3001\u8fd0\u884c\u548c\u4f18\u5316Python\u7a0b\u5e8f\u3002\u638c\u63e1Python\u7684\u57fa\u7840\u548c\u9ad8\u7ea7\u7279\u6027\uff0c\u5c06\u4f7f\u60a8\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u66f4\u52a0\u6e38\u5203\u6709\u4f59\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6211\u7684\u7535\u8111\u4e0a\u5b89\u88c5Python\u4ee5\u4fbf\u8fd0\u884c\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u5728\u60a8\u7684\u7535\u8111\u4e0a\u5b89\u88c5Python\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\u6700\u65b0\u7248\u672c\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8fd0\u884cPython\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python<\/code>\u6765\u542f\u52a8Python\u89e3\u91ca\u5668\uff0c\u5f00\u59cb\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u5de5\u5177\u6765\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff1f<\/strong><br \/>\u6709\u8bb8\u591a\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u6700\u5e38\u89c1\u7684\u9009\u62e9\u662f\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u548c\u6587\u672c\u7f16\u8f91\u5668\u3002\u63a8\u8350\u7684IDE\u5305\u62ecPyCharm\u3001Visual Studio Code\u548cJupyter Notebook\u3002\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u5982\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u3001\u8c03\u8bd5\u5de5\u5177\u548c\u53ef\u89c6\u5316\u754c\u9762\uff0c\u80fd\u591f\u63d0\u9ad8\u60a8\u7684\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884cPython\u811a\u672c\uff1f<\/strong><br \/>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884cPython\u811a\u672c\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u7684\u811a\u672c\u6587\u4ef6\u4fdd\u5b58\u4e3a<code>.py<\/code>\u540e\u7f00\u3002\u7136\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u754c\u9762\uff0c\u5bfc\u822a\u5230\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165<code>python script_name.py<\/code>\uff08\u5c06<code>script_name.py<\/code>\u66ff\u6362\u4e3a\u60a8\u7684\u6587\u4ef6\u540d\uff09\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u3002\u6b64\u65f6\uff0cPython\u5c06\u6267\u884c\u60a8\u7684\u811a\u672c\uff0c\u60a8\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u770b\u5230\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u9009\u62e9\u5408\u9002\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u4ee3\u7801\u7f16\u8f91\u5668\u3001\u7f16\u5199Py [&hellip;]","protected":false},"author":3,"featured_media":921849,"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\/921844"}],"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=921844"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921844\/revisions"}],"predecessor-version":[{"id":921850,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921844\/revisions\/921850"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/921849"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=921844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=921844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=921844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}