{"id":1100947,"date":"2025-01-08T15:44:38","date_gmt":"2025-01-08T07:44:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1100947.html"},"modified":"2025-01-08T15:44:42","modified_gmt":"2025-01-08T07:44:42","slug":"%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80python%e8%87%aa%e5%b8%a6%e7%9a%84%e7%bc%96%e8%be%91%e5%99%a8-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1100947.html","title":{"rendered":"\u5982\u4f55\u6253\u5f00python\u81ea\u5e26\u7684\u7f16\u8f91\u5668"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25063940\/2fc56d42-ae72-4522-bb64-8bd90c3dd508.webp\" alt=\"\u5982\u4f55\u6253\u5f00python\u81ea\u5e26\u7684\u7f16\u8f91\u5668\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u6253\u5f00python\u81ea\u5e26\u7684\u7f16\u8f91\u5668\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u542f\u52a8\u3001\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u542f\u52a8\u3001\u5b89\u88c5\u5e76\u4f7f\u7528IDLE\u7f16\u8f91\u5668\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/strong>\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u542f\u52a8\u662f\u6700\u65b9\u4fbf\u5feb\u6377\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpython -m idlelib.idle\u201d\u547d\u4ee4\u6765\u542f\u52a8Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668IDLE\u3002IDLE\u662f\u4e00\u4e2a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u63d0\u4f9b\u4e86\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u529f\u80fd\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u542f\u52a8<\/h3>\n<\/p>\n<p><p>\u5728\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0cPython\u81ea\u5e26\u7684\u7f16\u8f91\u5668IDLE\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u542f\u52a8\u3002\u8fd9\u79cd\u65b9\u5f0f\u975e\u5e38\u76f4\u63a5\uff0c\u53ea\u9700\u51e0\u6b65\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u884c\u754c\u9762<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u4e2d\uff0c\u6309\u4e0b <code>Win + R<\/code> \u952e\uff0c\u8f93\u5165 <code>cmd<\/code> \u7136\u540e\u6309\u4e0b\u56de\u8f66\u952e\u3002<\/li>\n<li>\u5728macOS\u4e2d\uff0c\u6309\u4e0b <code>Command + Space<\/code> \u952e\uff0c\u8f93\u5165 <code>Terminal<\/code> \u7136\u540e\u6309\u4e0b\u56de\u8f66\u952e\u3002<\/li>\n<li>\u5728Linux\u4e2d\uff0c\u6309\u4e0b <code>Ctrl + Alt + T<\/code> \u952e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u8f93\u5165\u542f\u52a8\u547d\u4ee4<\/strong>\uff1a<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5e76\u6309\u4e0b\u56de\u8f66\u952e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m idlelib.idle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u542f\u52a8IDLE\u7f16\u8f91\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u7684\u4f18\u70b9\u662f\u7b80\u5355\u5feb\u6377\uff0c\u4e0d\u9700\u8981\u7279\u522b\u7684\u914d\u7f6e\uff0c\u4f46\u524d\u63d0\u662f\u7cfb\u7edf\u5df2\u7ecf\u6b63\u786e\u5b89\u88c5\u4e86Python\uff0c\u5e76\u4e14\u914d\u7f6e\u4e86\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u542f\u52a8<\/h3>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u6765\u542f\u52a8Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u5f00\u59cb\u83dc\u5355<\/strong>\uff1a<\/p>\n<p>\u70b9\u51fb\u684c\u9762\u5de6\u4e0b\u89d2\u7684Windows\u56fe\u6807\uff0c\u6216\u8005\u6309\u4e0b <code>Win<\/code> \u952e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u627e\u5230Python\u6587\u4ef6\u5939<\/strong>\uff1a<\/p>\n<p>\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\uff0c\u627e\u5230\u5e76\u5c55\u5f00Python\u6587\u4ef6\u5939\uff0c\u901a\u5e38\u6587\u4ef6\u5939\u540d\u79f0\u4f1a\u5305\u542bPython\u7684\u7248\u672c\u53f7\uff0c\u4f8b\u5982 <code>Python 3.8<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8IDLE<\/strong>\uff1a<\/p>\n<p>\u5728Python\u6587\u4ef6\u5939\u4e2d\uff0c\u627e\u5230\u5e76\u70b9\u51fb <code>IDLE (Python 3.x)<\/code>\uff0c\u8fd9\u5c06\u542f\u52a8Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668IDLE\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u975e\u5e38\u9002\u5408\u4e0d\u592a\u719f\u6089\u547d\u4ee4\u884c\u64cd\u4f5c\u7684\u7528\u6237\uff0c\u901a\u8fc7\u56fe\u5f62\u754c\u9762\u70b9\u51fb\u51e0\u4e0b\u5c31\u53ef\u4ee5\u8f7b\u677e\u542f\u52a8IDLE\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5b89\u88c5\u5e76\u4f7f\u7528IDLE\u7f16\u8f91\u5668<\/h3>\n<\/p>\n<p><p>\u867d\u7136IDLE\u662fPython\u81ea\u5e26\u7684\u7f16\u8f91\u5668\uff0c\u4f46\u6709\u4e9b\u7528\u6237\u53ef\u80fd\u5728\u5b89\u88c5Python\u65f6\u6ca1\u6709\u9009\u62e9\u5b89\u88c5IDLE\u3002\u4e0b\u9762\u4ecb\u7ecd\u5982\u4f55\u5b89\u88c5\u5e76\u4f7f\u7528IDLE\u7f16\u8f91\u5668\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5\u662f\u5426\u5b89\u88c5IDLE<\/strong>\uff1a<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m idlelib.idle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u51fa\u73b0\u9519\u8bef\u63d0\u793a\uff0c\u8bf4\u660eIDLE\u672a\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5IDLE<\/strong>\uff1a<\/p>\n<p>\u91cd\u65b0\u8fd0\u884cPython\u5b89\u88c5\u7a0b\u5e8f\uff08\u53ef\u4ee5\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\uff09\uff0c\u5728\u5b89\u88c5\u9009\u9879\u4e2d\u786e\u4fdd\u52fe\u9009\u4e86 <code>IDLE<\/code> \u9009\u9879\uff0c\u7136\u540e\u5b8c\u6210\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8IDLE<\/strong>\uff1a<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u5f00\u59cb\u83dc\u5355\u542f\u52a8IDLE\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>IDLE\u7f16\u8f91\u5668\u63d0\u4f9b\u4e86\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u529f\u80fd\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7528\u6237\u53ef\u80fd\u9700\u8981\u624b\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4fbf\u80fd\u591f\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u542f\u52a8IDLE\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u754c\u9762<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u4e2d\uff0c\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u8ba1\u7b97\u673a\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\uff0c\u518d\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002<\/li>\n<li>\u5728macOS\u548cLinux\u4e2d\uff0c\u7f16\u8f91 <code>~\/.bashrc<\/code> \u6216 <code>~\/.zshrc<\/code> \u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0Python\u8def\u5f84<\/strong>\uff1a<\/p>\n<p>\u5728\u73af\u5883\u53d8\u91cf\u4e2d\u627e\u5230 <code>PATH<\/code> \u53d8\u91cf\uff0c\u7136\u540e\u5c06Python\u7684\u5b89\u88c5\u8def\u5f84\uff08\u4f8b\u5982 <code>C:\\Python38<\/code>\uff09\u6dfb\u52a0\u5230 <code>PATH<\/code> \u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u5e76\u5e94\u7528\u8bbe\u7f6e<\/strong>\uff1a<\/p>\n<p>\u4fdd\u5b58\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\uff0c\u7136\u540e\u91cd\u65b0\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8f93\u5165 <code>python<\/code> \u6216 <code>python3<\/code> \u6765\u542f\u52a8Python\u89e3\u91ca\u5668\uff0c\u8f93\u5165 <code>python -m idlelib.idle<\/code> \u6765\u542f\u52a8IDLE\u7f16\u8f91\u5668\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528IDLE\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u4e00\u65e6\u6210\u529f\u6253\u5f00Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668IDLE\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u64cd\u4f5c\u6765\u719f\u6089\u8fd9\u4e2a\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u6587\u4ef6<\/strong>\uff1a<\/p>\n<p>\u70b9\u51fb <code>File<\/code> \u83dc\u5355\uff0c\u9009\u62e9 <code>New File<\/code>\uff0c\u8fd9\u5c06\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7f16\u8f91\u7a97\u53e3\uff0c\u53ef\u4ee5\u5728\u5176\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u4ee3\u7801<\/strong>\uff1a<\/p>\n<p>\u5728\u65b0\u6587\u4ef6\u4e2d\u8f93\u5165Python\u4ee3\u7801\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u6587\u4ef6<\/strong>\uff1a<\/p>\n<p>\u70b9\u51fb <code>File<\/code> \u83dc\u5355\uff0c\u9009\u62e9 <code>Save<\/code>\uff0c\u4e3a\u6587\u4ef6\u547d\u540d\u5e76\u9009\u62e9\u4fdd\u5b58\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u4ee3\u7801<\/strong>\uff1a<\/p>\n<p>\u70b9\u51fb <code>Run<\/code> \u83dc\u5355\uff0c\u9009\u62e9 <code>Run Module<\/code> \u6216\u6309\u4e0b <code>F5<\/code> \u952e\uff0cIDLE\u5c06\u8fd0\u884c\u5f53\u524d\u6587\u4ef6\u4e2d\u7684\u4ee3\u7801\uff0c\u5e76\u5728Shell\u7a97\u53e3\u4e2d\u663e\u793a\u8f93\u51fa\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u516d\u3001IDLE\u7684\u9ad8\u7ea7\u529f\u80fd<\/h3>\n<\/p>\n<p><p>IDLE\u4e0d\u4ec5\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u9ad8\u6548\u5730\u7f16\u5199\u548c\u8c03\u8bd5\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4ee3\u7801\u9ad8\u4eae<\/strong>\uff1a<\/p>\n<p>IDLE\u4f1a\u81ea\u52a8\u4e3aPython\u4ee3\u7801\u6dfb\u52a0\u9ad8\u4eae\u663e\u793a\uff0c\u4e0d\u540c\u7684\u5173\u952e\u5b57\u3001\u53d8\u91cf\u3001\u5b57\u7b26\u4e32\u7b49\u4ee5\u4e0d\u540c\u7684\u989c\u8272\u663e\u793a\uff0c\u4fbf\u4e8e\u9605\u8bfb\u548c\u7406\u89e3\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u81ea\u52a8\u8865\u5168<\/strong>\uff1a<\/p>\n<p>\u5728\u7f16\u5199\u4ee3\u7801\u65f6\uff0cIDLE\u4f1a\u6839\u636e\u4e0a\u4e0b\u6587\u63d0\u4f9b\u81ea\u52a8\u8865\u5168\u5efa\u8bae\uff0c\u6309\u4e0b <code>Tab<\/code> \u952e\u53ef\u4ee5\u5feb\u901f\u8865\u5168\u4ee3\u7801\uff0c\u63d0\u9ad8\u7f16\u5199\u6548\u7387\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u8bd5\u529f\u80fd<\/strong>\uff1a<\/p>\n<p>IDLE\u5185\u7f6e\u4e86\u8c03\u8bd5\u5668\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u3001\u5355\u6b65\u6267\u884c\u4ee3\u7801\u3001\u67e5\u770b\u53d8\u91cf\u503c\u7b49\u3002\u70b9\u51fb <code>Debug<\/code> \u83dc\u5355\uff0c\u9009\u62e9 <code>Debugger<\/code> \u53ef\u4ee5\u6253\u5f00\u8c03\u8bd5\u5668\u754c\u9762\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u591a\u7a97\u53e3\u7f16\u8f91<\/strong>\uff1a<\/p>\n<p>IDLE\u652f\u6301\u540c\u65f6\u6253\u5f00\u591a\u4e2a\u7f16\u8f91\u7a97\u53e3\uff0c\u53ef\u4ee5\u5e76\u884c\u7f16\u5199\u548c\u67e5\u770b\u591a\u4e2a\u6587\u4ef6\uff0c\u65b9\u4fbf\u8fdb\u884c\u4ee3\u7801\u5bf9\u6bd4\u548c\u53c2\u8003\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u641c\u7d22\u548c\u66ff\u6362<\/strong>\uff1a<\/p>\n<p>IDLE\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u641c\u7d22\u548c\u66ff\u6362\u529f\u80fd\uff0c\u53ef\u4ee5\u5728\u5f53\u524d\u6587\u4ef6\u6216\u6240\u6709\u6253\u5f00\u7684\u6587\u4ef6\u4e2d\u8fdb\u884c\u641c\u7d22\u548c\u66ff\u6362\u64cd\u4f5c\u3002\u70b9\u51fb <code>Edit<\/code> \u83dc\u5355\uff0c\u9009\u62e9 <code>Find...<\/code> \u6216 <code>Replace...<\/code> \u5373\u53ef\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528IDLE\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>IDLE\u65e0\u6cd5\u542f\u52a8<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u68c0\u67e5Python\u662f\u5426\u5b89\u88c5\u6b63\u786e\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165 <code>python --version<\/code> \u67e5\u770b\u7248\u672c\u4fe1\u606f\u3002<\/li>\n<li>\u786e\u4fdd\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6b63\u786e\uff0cPython\u7684\u5b89\u88c5\u8def\u5f84\u5df2\u6dfb\u52a0\u5230 <code>PATH<\/code> \u53d8\u91cf\u4e2d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u8fd0\u884c\u9519\u8bef<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u68c0\u67e5\u4ee3\u7801\u8bed\u6cd5\u662f\u5426\u6b63\u786e\uff0cIDLE\u4f1a\u9ad8\u4eae\u663e\u793a\u8bed\u6cd5\u9519\u8bef\u7684\u4f4d\u7f6e\u3002<\/li>\n<li>\u4f7f\u7528\u8c03\u8bd5\u529f\u80fd\u67e5\u627e\u95ee\u9898\u6240\u5728\uff0c\u8bbe\u7f6e\u65ad\u70b9\u5e76\u9010\u884c\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u53d8\u91cf\u503c\u548c\u7a0b\u5e8f\u72b6\u6001\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>IDLE\u5361\u987f\u6216\u5d29\u6e83<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u68c0\u67e5\u7535\u8111\u914d\u7f6e\u662f\u5426\u6ee1\u8db3\u8981\u6c42\uff0cIDLE\u5bf9\u7cfb\u7edf\u8d44\u6e90\u7684\u5360\u7528\u8f83\u4f4e\uff0c\u4f46\u5927\u578b\u9879\u76ee\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5361\u987f\u3002<\/li>\n<li>\u5173\u95ed\u4e0d\u5fc5\u8981\u7684\u7f16\u8f91\u7a97\u53e3\u548c\u5176\u4ed6\u540e\u53f0\u7a0b\u5e8f\uff0c\u91ca\u653e\u7cfb\u7edf\u8d44\u6e90\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u516b\u3001IDLE\u7684\u66ff\u4ee3\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u867d\u7136IDLE\u662f\u4e00\u4e2a\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u7684\u7f16\u8f91\u5668\uff0c\u4f46\u968f\u7740\u7f16\u7a0b\u6280\u80fd\u7684\u63d0\u5347\uff0c\u7528\u6237\u53ef\u80fd\u9700\u8981\u529f\u80fd\u66f4\u5f3a\u5927\u7684\u5f00\u53d1\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u89c1\u7684IDLE\u66ff\u4ee3\u5de5\u5177\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>PyCharm<\/strong>\uff1a<\/p>\n<p>PyCharm\u662f\u7531JetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u5f00\u53d1\u7684\u4e00\u6b3e\u4e13\u4e1a\u7684Python\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u5305\u62ec\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u3001\u8c03\u8bd5\u3001\u7248\u672c\u63a7\u5236\u7b49\uff0c\u975e\u5e38\u9002\u5408\u5927\u578b\u9879\u76ee\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Visual Studio Code<\/strong>\uff1a<\/p>\n<p>VS Code\u662f\u5fae\u8f6f\u63a8\u51fa\u7684\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u901a\u8fc7\u5b89\u88c5\u63d2\u4ef6\u53ef\u4ee5\u6269\u5c55\u5176\u529f\u80fd\uff0c\u652f\u6301Python\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Jupyter Notebook<\/strong>\uff1a<\/p>\n<p>Jupyter Notebook\u662f\u4e00\u6b3e\u57fa\u4e8eWeb\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u5de5\u5177\uff0c\u5e7f\u6cdb\u7528\u4e8e\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u9886\u57df\uff0c\u652f\u6301\u4ee3\u7801\u3001\u6587\u672c\u3001\u56fe\u8868\u6df7\u5408\u7f16\u5199\u548c\u5c55\u793a\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Sublime Text<\/strong>\uff1a<\/p>\n<p>Sublime Text\u662f\u4e00\u6b3e\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u901a\u8fc7\u5b89\u88c5\u63d2\u4ef6\u53ef\u4ee5\u6269\u5c55\u5176\u529f\u80fd\uff0c\u652f\u6301Python\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u6253\u5f00Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668IDLE\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u884c\u542f\u52a8\u3001\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u542f\u52a8\u3001\u5b89\u88c5\u5e76\u4f7f\u7528IDLE\u7f16\u8f91\u5668\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u7b49\u3002IDLE\u63d0\u4f9b\u4e86\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u529f\u80fd\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u3002\u5728\u4f7f\u7528IDLE\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u5b89\u88c5\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528\u8c03\u8bd5\u529f\u80fd\u7b49\u65b9\u6cd5\u89e3\u51b3\u3002\u968f\u7740\u7f16\u7a0b\u6280\u80fd\u7684\u63d0\u5347\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u9009\u62e9\u529f\u80fd\u66f4\u5f3a\u5927\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u5982PyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u3001Sublime Text\u7b49\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u5e0c\u671b\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u4f7f\u7528IDLE\uff0c\u63d0\u5347Python\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u627e\u5230Python\u81ea\u5e26\u7684\u7f16\u8f91\u5668\uff1f<\/strong><br \/>Python\u7684\u81ea\u5e26\u7f16\u8f91\u5668\u901a\u5e38\u662fIDLE\u3002\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u53ef\u4ee5\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u627e\u5230Python\u7684\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u4f1a\u6709IDLE\u7684\u5feb\u6377\u65b9\u5f0f\u3002Mac\u7528\u6237\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u6587\u4ef6\u5939\u4e2d\u627e\u5230Python\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u540c\u6837\u5305\u542bIDLE\u3002Linux\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8f93\u5165<code>idle<\/code>\u547d\u4ee4\u6765\u542f\u52a8\u3002\u786e\u4fdd\u4f60\u7684Python\u5df2\u7ecf\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<p><strong>IDLE\u7f16\u8f91\u5668\u7684\u4e3b\u8981\u529f\u80fd\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>IDLE\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684Python\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u63d0\u4f9b\u4e86\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u7f29\u8fdb\u548c\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u7b49\u529f\u80fd\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5b83\u8f7b\u677e\u7f16\u5199\u548c\u6d4b\u8bd5Python\u4ee3\u7801\u3002IDLE\u8fd8\u652f\u6301\u8c03\u8bd5\u529f\u80fd\uff0c\u7528\u6237\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u5e76\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u5e2e\u52a9\u6392\u67e5\u9519\u8bef\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728IDLE\u4e2d\u4fdd\u5b58\u548c\u8fd0\u884c\u6211\u7684Python\u4ee3\u7801\uff1f<\/strong><br \/>\u5728IDLE\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u201c\u6587\u4ef6\u201d\u83dc\u5355\u9009\u62e9\u201c\u65b0\u5efa\u6587\u4ef6\u201d\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7f16\u8f91\u7a97\u53e3\u3002\u5728\u7f16\u8f91\u7a97\u53e3\u4e2d\u7f16\u5199\u4ee3\u7801\u540e\uff0c\u53ef\u4ee5\u9009\u62e9\u201c\u6587\u4ef6\u201d\u83dc\u5355\u4e0b\u7684\u201c\u4fdd\u5b58\u201d\u9009\u9879\uff0c\u5c06\u6587\u4ef6\u4fdd\u5b58\u4e3a<code>.py<\/code>\u683c\u5f0f\u3002\u8fd0\u884c\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u83dc\u5355\u4e2d\u7684\u201c\u8fd0\u884c\u6a21\u5757\u201d\u9009\u9879\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952eF5\u6765\u6267\u884c\u5f53\u524d\u7f16\u8f91\u7684\u811a\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u6253\u5f00python\u81ea\u5e26\u7684\u7f16\u8f91\u5668\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u542f\u52a8\u3001\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u542f\u52a8\u3001\u5b89\u88c5\u5e76\u4f7f\u7528IDLE\u7f16\u8f91\u5668\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u5728 [&hellip;]","protected":false},"author":3,"featured_media":1100953,"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\/1100947"}],"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=1100947"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1100947\/revisions"}],"predecessor-version":[{"id":1100954,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1100947\/revisions\/1100954"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1100953"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1100947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1100947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1100947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}