{"id":989007,"date":"2024-12-27T08:07:28","date_gmt":"2024-12-27T00:07:28","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/989007.html"},"modified":"2024-12-27T08:07:32","modified_gmt":"2024-12-27T00:07:32","slug":"python%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/989007.html","title":{"rendered":"python\u5c0f\u7a0b\u5e8f\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\/25064411\/c30e949d-4dfd-426f-bc50-4e0f3e1e8f7d.webp\" alt=\"python\u5c0f\u7a0b\u5e8f\u5982\u4f55\u8fd0\u884c\" \/><\/p>\n<p><p> <strong>Python\u5c0f\u7a0b\u5e8f\u7684\u8fd0\u884c\u4e3b\u8981\u4f9d\u8d56\u4e8ePython\u89e3\u91ca\u5668\u3001\u5f00\u53d1\u73af\u5883\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u3001\u4ee3\u7801\u7f16\u5199\u53ca\u8c03\u8bd5\u3001\u6267\u884c\u73af\u5883\u7684\u9009\u62e9\u3002<\/strong>\u5176\u4e2d\uff0cPython\u89e3\u91ca\u5668\u662f\u8fd0\u884cPython\u4ee3\u7801\u7684\u6838\u5fc3\uff0c\u5f00\u53d1\u73af\u5883\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u4ee3\u7801\u7f16\u5199\u548c\u8c03\u8bd5\u5de5\u5177\uff0c\u800c\u6267\u884c\u73af\u5883\u5219\u51b3\u5b9a\u4e86\u7a0b\u5e8f\u7684\u8fd0\u884c\u65b9\u5f0f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u5173\u952e\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001PYTHON\u89e3\u91ca\u5668\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e<\/p>\n<\/p>\n<p><p>Python\u662f\u4e00\u79cd\u89e3\u91ca\u578b\u8bed\u8a00\uff0c\u4ee3\u7801\u7684\u6267\u884c\u4f9d\u8d56\u4e8ePython\u89e3\u91ca\u5668\u3002\u5b89\u88c5\u548c\u914d\u7f6ePython\u89e3\u91ca\u5668\u662f\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\u7684\u7b2c\u4e00\u6b65\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u4e0e\u5b89\u88c5Python\u89e3\u91ca\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u8fd0\u884cPython\u4ee3\u7801\uff0c\u9996\u5148\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E9%80%82%E5%90%88%E6%82%A8%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84Python%E7%89%88%E6%9C%AC%E3%80%82%E4%B8%8B%E8%BD%BD%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E8%BF%90%E8%A1%8C%E5%AE%89%E8%A3%85%E5%8C%85%EF%BC%8C%E6%A0%B9%E6%8D%AE%E6%8F%90%E7%A4%BA%E5%AE%8C%E6%88%90%E5%AE%89%E8%A3%85%E3%80%82%E5%9C%A8%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B%E4%B8%AD%EF%BC%8C%E5%BB%BA%E8%AE%AE%E5%8B%BE%E9%80%89%E2%80%9CAdd\">https:\/\/www.python.org\/\uff09\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u5305\uff0c\u6839\u636e\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5efa\u8bae\u52fe\u9009\u201cAdd<\/a> Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u524d\u6240\u8ff0\uff0c\u5b89\u88c5\u65f6\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\u53ef\u4ee5\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c\u6ca1\u6709\u9009\u62e9\uff0c\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0Python\u7684\u5b89\u88c5\u8def\u5f84\u548cScripts\u76ee\u5f55\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u8fd9\u6837\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python<\/code>\u5373\u53ef\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08macOS\/Linux\uff09\uff0c\u8f93\u5165<code>python --version<\/code>\uff0c\u5982\u679c\u6b63\u786e\u663e\u793aPython\u7248\u672c\u53f7\uff0c\u5219\u8868\u793aPython\u89e3\u91ca\u5668\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5f00\u53d1\u73af\u5883\u7684\u9009\u62e9\u4e0e\u4f7f\u7528<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\u53ef\u4ee5\u63d0\u9ad8Python\u5c0f\u7a0b\u5e8f\u7684\u7f16\u5199\u548c\u8c03\u8bd5\u6548\u7387\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7684\u9009\u62e9<\/strong><\/p>\n<\/p>\n<p><p>\u6709\u8bb8\u591aIDE\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1Python\u7a0b\u5e8f\uff0c\u5982PyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u7b49\u3002PyCharm\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684Python\u4e13\u7528IDE\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u7684\u5f00\u53d1\uff1bVisual Studio Code\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\uff0c\u63d2\u4ef6\u4e30\u5bcc\uff1bJupyter Notebook\u5219\u7279\u522b\u9002\u5408\u6570\u636e\u5206\u6790\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u9879\u76ee\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u4e0e\u914d\u7f6eIDE<\/strong><\/p>\n<\/p>\n<p><p>\u4ee5Visual Studio Code\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u901a\u8fc7\u5176\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Python\u6269\u5c55\u63d2\u4ef6\u6765\u589e\u5f3a\u5bf9Python\u5f00\u53d1\u7684\u652f\u6301\uff0c\u5305\u62ec\u8bed\u6cd5\u9ad8\u4eae\u3001\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u529f\u80fd\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8c03\u8bd5Python\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728IDE\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff08\u6269\u5c55\u540d\u4e3a.py\uff09\uff0c\u5373\u53ef\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u3002IDE\u901a\u5e38\u63d0\u4f9b\u4e86\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u5728\u4e0d\u79bb\u5f00\u7f16\u8f91\u5668\u7684\u60c5\u51b5\u4e0b\u5355\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u68c0\u67e5\u53d8\u91cf\u72b6\u6001\uff0c\u5e2e\u52a9\u53d1\u73b0\u548c\u4fee\u590d\u9519\u8bef\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u7f16\u5199\u4e0e\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>Python\u5c0f\u7a0b\u5e8f\u7684\u7f16\u5199\u6d89\u53ca\u4ee3\u7801\u7ed3\u6784\u8bbe\u8ba1\u3001\u51fd\u6570\u7684\u5b9a\u4e49\u548c\u8c03\u7528\u3001\u6a21\u5757\u548c\u5305\u7684\u4f7f\u7528\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7f16\u5199Python\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5f00\u59cb\u7f16\u5199Python\u4ee3\u7801\u65f6\uff0c\u6700\u597d\u4ece\u7b80\u5355\u7684\u529f\u80fd\u5f00\u59cb\u3002\u53ef\u4ee5\u4ece\u5b9a\u4e49\u51fd\u6570\u3001\u4f7f\u7528\u6761\u4ef6\u8bed\u53e5\u548c\u5faa\u73af\u8bed\u53e5\u7b49\u57fa\u672c\u8bed\u6cd5\u7ed3\u6784\u5165\u624b\uff0c\u9010\u6b65\u5b8c\u5584\u7a0b\u5e8f\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6a21\u5757\u4e0e\u5305\u7684\u4f7f\u7528<\/strong><\/p>\n<\/p>\n<p><p>\u5f53\u7a0b\u5e8f\u89c4\u6a21\u8f83\u5927\u65f6\uff0c\u53ef\u4ee5\u5c06\u4ee3\u7801\u5206\u89e3\u4e3a\u591a\u4e2a\u6a21\u5757\uff0c\u6bcf\u4e2a\u6a21\u5757\u5b9e\u73b0\u7279\u5b9a\u7684\u529f\u80fd\u3002\u5c06\u76f8\u5173\u6a21\u5757\u7ec4\u7ec7\u4e3a\u4e00\u4e2a\u5305\uff0c\u4fbf\u4e8e\u7ba1\u7406\u548c\u91cd\u7528\u3002\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u53ef\u4ee5\u5728\u7a0b\u5e8f\u4e2d\u5f15\u5165\u6a21\u5757\u548c\u5305\uff0c\u8c03\u7528\u5176\u4e2d\u7684\u51fd\u6570\u548c\u7c7b\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\uff0c\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165<code>python script_name.py<\/code>\u5373\u53ef\u8fd0\u884c\u7a0b\u5e8f\u3002\u5728IDE\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u6309\u94ae\u6765\u6267\u884c\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001Python\u5c0f\u7a0b\u5e8f\u7684\u8c03\u8bd5\u4e0e\u4f18\u5316<\/p>\n<\/p>\n<p><p>\u8c03\u8bd5\u548c\u4f18\u5316\u662f\u4fdd\u8bc1Python\u5c0f\u7a0b\u5e8f\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u7684\u5173\u952e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8c03\u8bd5Python\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p>\u8c03\u8bd5\u662f\u53d1\u73b0\u548c\u4fee\u590d\u7a0b\u5e8f\u9519\u8bef\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u4f7f\u7528IDE\u63d0\u4f9b\u7684\u8c03\u8bd5\u5de5\u5177\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u3001\u5355\u6b65\u6267\u884c\u4ee3\u7801\u3001\u67e5\u770b\u53d8\u91cf\u503c\uff0c\u4ee5\u4fbf\u7cbe\u786e\u5b9a\u4f4d\u9519\u8bef\u6240\u5728\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u4f18\u5316<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u8fd0\u884c\u901f\u5ea6\u8f83\u6162\u7684Python\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f18\u5316\u7b97\u6cd5\u3001\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u8ba1\u7b97\u3001\u4f7f\u7528\u66f4\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u7b49\u65b9\u5f0f\u63d0\u9ad8\u6027\u80fd\u3002\u4f7f\u7528Profiling\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u6027\u80fd\u74f6\u9888\uff0c\u4e3a\u4f18\u5316\u63d0\u4f9b\u4f9d\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u8d28\u91cf\u63d0\u5347<\/strong><\/p>\n<\/p>\n<p><p>\u7f16\u5199\u9ad8\u8d28\u91cf\u7684\u4ee3\u7801\u4e0d\u4ec5\u6709\u52a9\u4e8e\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\uff0c\u4e5f\u6709\u52a9\u4e8e\u63d0\u9ad8\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u3002\u9075\u5faaPython\u7684\u7f16\u7801\u89c4\u8303\uff08PEP 8\uff09\uff0c\u7f16\u5199\u6e05\u6670\u7684\u6ce8\u91ca\uff0c\u64b0\u5199\u5355\u5143\u6d4b\u8bd5\uff0c\u90fd\u662f\u63d0\u5347\u4ee3\u7801\u8d28\u91cf\u7684\u6709\u6548\u63aa\u65bd\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001Python\u7a0b\u5e8f\u7684\u53d1\u5e03\u4e0e\u5206\u53d1<\/p>\n<\/p>\n<p><p>Python\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u53d1\u5e03\u548c\u5206\u53d1\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u53ef\u6267\u884c\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528\u5982PyInstaller\u3001cx_Freeze\u7b49\u5de5\u5177\u5c06Python\u811a\u672c\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4fbf\u4e8e\u5728\u6ca1\u6709\u5b89\u88c5Python\u89e3\u91ca\u5668\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u5e03\u5230PyPI<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u60f3\u8981\u4e0e\u4ed6\u4eba\u5206\u4eabPython\u5e93\uff0c\u53ef\u4ee5\u5c06\u5176\u53d1\u5e03\u5230Python Package Index\uff08PyPI\uff09\u3002PyPI\u662fPython\u7684\u5b98\u65b9\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u5b58\u50a8\u5e93\uff0c\u5176\u4ed6\u7528\u6237\u53ef\u4ee5\u901a\u8fc7<code>pip install<\/code>\u547d\u4ee4\u5b89\u88c5\u548c\u4f7f\u7528\u53d1\u5e03\u7684\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5f00\u6e90\u9879\u76ee\u7684\u6258\u7ba1<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5f00\u6e90\u9879\u76ee\uff0c\u53ef\u4ee5\u5c06\u5176\u6258\u7ba1\u5728GitHub\u7b49\u5e73\u53f0\u4e0a\uff0c\u4fbf\u4e8e\u4e0e\u4ed6\u4eba\u534f\u4f5c\u5f00\u53d1\u3002\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982Git\uff09\u53ef\u4ee5\u6709\u6548\u7ba1\u7406\u4ee3\u7801\u7248\u672c\uff0c\u8ddf\u8e2a\u4ee3\u7801\u53d8\u66f4\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\u9700\u8981\u4ecePython\u89e3\u91ca\u5668\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u5f00\u59cb\uff0c\u9009\u62e9\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\uff0c\u7f16\u5199\u548c\u8c03\u8bd5\u4ee3\u7801\uff0c\u6700\u540e\u8fdb\u884c\u7a0b\u5e8f\u7684\u53d1\u5e03\u4e0e\u5206\u53d1\u3002\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u9ad8\u6548\u5730\u5f00\u53d1\u548c\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\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\u8fd0\u884c\u5c0f\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u5728\u7535\u8111\u4e0a\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u9009\u4e2d\u201cAdd Python to PATH\u201d\u7684\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\u3002\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u60a8\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><strong>\u6211\u9700\u8981\u54ea\u4e9b\u5de5\u5177\u6765\u7f16\u5199\u548c\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\uff1f<\/strong><br \/>\u7f16\u5199Python\u5c0f\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u6587\u672c\u7f16\u8f91\u5668\u6216\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002\u5e38\u89c1\u7684\u9009\u62e9\u5305\u62ecVisual Studio Code\u3001PyCharm\u3001Sublime Text\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\uff0c\u53ef\u4ee5\u63d0\u5347\u7f16\u7a0b\u6548\u7387\u3002\u5b89\u88c5\u5b8cIDE\u540e\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff08\u4ee5<code>.py<\/code>\u7ed3\u5c3e\uff09\uff0c\u5728\u5176\u4e2d\u7f16\u5199\u60a8\u7684\u4ee3\u7801\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4e00\u4e2aPython\u5c0f\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884cPython\u5c0f\u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\u5e76\u5bfc\u822a\u5230\u5b58\u653ePython\u6587\u4ef6\u7684\u76ee\u5f55\u3002\u53ef\u4ee5\u4f7f\u7528<code>cd<\/code>\u547d\u4ee4\u66f4\u6539\u76ee\u5f55\u3002\u63a5\u7740\uff0c\u8f93\u5165<code>python your_program.py<\/code>\uff08\u5c06<code>your_program.py<\/code>\u66ff\u6362\u4e3a\u5b9e\u9645\u6587\u4ef6\u540d\uff09\u5e76\u6309\u4e0b\u56de\u8f66\u3002\u6b64\u65f6\uff0cPython\u89e3\u91ca\u5668\u4f1a\u6267\u884c\u8be5\u7a0b\u5e8f\uff0c\u5e76\u5728\u547d\u4ee4\u884c\u4e2d\u663e\u793a\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5c0f\u7a0b\u5e8f\u7684\u8fd0\u884c\u4e3b\u8981\u4f9d\u8d56\u4e8ePython\u89e3\u91ca\u5668\u3001\u5f00\u53d1\u73af\u5883\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u3001\u4ee3\u7801\u7f16\u5199\u53ca\u8c03\u8bd5\u3001\u6267\u884c\u73af\u5883\u7684\u9009\u62e9\u3002\u5176 [&hellip;]","protected":false},"author":3,"featured_media":989016,"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\/989007"}],"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=989007"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/989007\/revisions"}],"predecessor-version":[{"id":989019,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/989007\/revisions\/989019"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/989016"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=989007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=989007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=989007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}