{"id":982125,"date":"2024-12-27T07:08:18","date_gmt":"2024-12-26T23:08:18","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/982125.html"},"modified":"2024-12-27T07:08:20","modified_gmt":"2024-12-26T23:08:20","slug":"atom%e4%b8%ad%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/982125.html","title":{"rendered":"atom\u4e2d\u5982\u4f55\u8fd0\u884cpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210745\/cde3d5af-268d-4e49-8600-1659728f0189.webp\" alt=\"atom\u4e2d\u5982\u4f55\u8fd0\u884cpython\" \/><\/p>\n<p><p> \u5728Atom\u4e2d\u8fd0\u884cPython\u4ee3\u7801\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4e3b\u8981\u5305\u62ec\uff1a<strong>\u4f7f\u7528\u7ec8\u7aef\u63d2\u4ef6\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\u63d2\u4ef6\u3001\u4f7f\u7528\u5916\u90e8\u7ec8\u7aef<\/strong>\u3002\u5176\u4e2d\uff0c\u63a8\u8350\u4f7f\u7528\u7ec8\u7aef\u63d2\u4ef6\uff0c\u56e0\u4e3a\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u7528\uff0c\u9002\u5408\u5927\u591a\u6570\u7528\u6237\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u7ec8\u7aef\u63d2\u4ef6\u5728Atom\u4e2d\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u3002\u5982\u679c\u672a\u5b89\u88c5\uff0c\u53ef\u4ee5\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u7ec8\u7aef\u63d2\u4ef6<\/h3>\n<\/p>\n<p><p>Atom\u672c\u8eab\u5e76\u4e0d\u76f4\u63a5\u652f\u6301\u8fd0\u884c\u4ee3\u7801\uff0c\u4f46\u901a\u8fc7\u5b89\u88c5\u63d2\u4ef6\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002\u6700\u5e38\u7528\u7684\u7ec8\u7aef\u63d2\u4ef6\u662f<code>platformio-ide-terminal<\/code>\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5platformio-ide-terminal<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00Atom\uff0c\u70b9\u51fb\u83dc\u5355\u680f\u7684\u201cFile\u201d\u9009\u9879\uff0c\u7136\u540e\u9009\u62e9\u201cSettings\u201d\u3002<\/li>\n<li>\u5728\u8bbe\u7f6e\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u5de6\u4fa7\u7684\u201cInstall\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165<code>platformio-ide-terminal<\/code>\uff0c\u70b9\u51fb\u201cPackages\u201d\u8fdb\u884c\u641c\u7d22\u3002<\/li>\n<li>\u627e\u5230<code>platformio-ide-terminal<\/code>\u63d2\u4ef6\u540e\uff0c\u70b9\u51fb\u201cInstall\u201d\u6309\u94ae\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528platformio-ide-terminal\u8fd0\u884cPython<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Atom\u4e2d\u6253\u5f00\u9700\u8981\u8fd0\u884c\u7684Python\u811a\u672c\u3002<\/li>\n<li>\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+<\/code>\uff08\u6216\u901a\u8fc7\u83dc\u5355\uff09\u6253\u5f00\u7ec8\u7aef\u3002<\/li>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python script_name.py<\/code>\uff08\u5c06<code>script_name.py<\/code>\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684Python\u6587\u4ef6\u540d\uff09\uff0c\u6309\u4e0b\u56de\u8f66\u952e\u8fd0\u884c\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u4e8c\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\u63d2\u4ef6<\/h3>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\u63d2\u4ef6\uff0c\u4f8b\u5982<code>atom-python-run<\/code>\u3002\u6b64\u63d2\u4ef6\u53ef\u4ee5\u76f4\u63a5\u5728Atom\u4e2d\u8fd0\u884cPython\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5atom-python-run<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u540c\u6837\u5728Atom\u7684\u201cSettings\u201d\u4e2d\uff0c\u9009\u62e9\u201cInstall\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u641c\u7d22<code>atom-python-run<\/code>\u63d2\u4ef6\uff0c\u70b9\u51fb\u201cInstall\u201d\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528atom-python-run\u8fd0\u884cPython<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u4f60\u7684Python\u6587\u4ef6\u3002<\/li>\n<li>\u4f7f\u7528\u5feb\u6377\u952e<code>Alt+R<\/code>\u6765\u8fd0\u884c\u5f53\u524d\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p><strong>\u6ce8\u610f<\/strong>\uff1a<code>atom-python-run<\/code>\u63d2\u4ef6\u4f9d\u8d56\u4e8ePython\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\uff0c\u5982\u679c\u5728\u8fd0\u884c\u65f6\u51fa\u73b0\u95ee\u9898\uff0c\u8bf7\u786e\u4fddPython\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u914d\u7f6e\u5728\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u5916\u90e8\u7ec8\u7aef<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u4e0d\u60f3\u5728Atom\u5185\u8fd0\u884cPython\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u5728\u5916\u90e8\u7ec8\u7aef\u4e2d\u6267\u884cPython\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5728\u5916\u90e8\u7ec8\u7aef\u8fd0\u884cPython<\/strong>\uff1a\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\uff08Windows\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\uff0cmacOS\u548cLinux\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\u5e94\u7528\uff09\u3002<\/li>\n<li>\u5bfc\u822a\u5230Python\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002<\/li>\n<li>\u8f93\u5165\u547d\u4ee4<code>python script_name.py<\/code>\uff0c\u6309\u4e0b\u56de\u8f66\u952e\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u56db\u3001\u8c03\u8bd5Python\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u8c03\u8bd5\u4ee3\u7801\u662f\u7a0b\u5e8f\u5f00\u53d1\u7684\u91cd\u8981\u73af\u8282\u3002\u5728Atom\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u63d2\u4ef6\u6dfb\u52a0\u8c03\u8bd5\u529f\u80fd\uff0c\u4f8b\u5982<code>atom-ide-debugger-python<\/code>\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5atom-ide-debugger-python<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Atom\u7684\u201cInstall\u201d\u9009\u9879\u5361\u4e2d\uff0c\u641c\u7d22\u5e76\u5b89\u88c5<code>atom-ide-debugger-python<\/code>\u63d2\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u529f\u80fd<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u9700\u8981\u8c03\u8bd5\u7684Python\u6587\u4ef6\u3002<\/li>\n<li>\u5728\u8c03\u8bd5\u9762\u677f\u4e2d\u914d\u7f6e\u65ad\u70b9\u548c\u8c03\u8bd5\u53c2\u6570\u3002<\/li>\n<li>\u5f00\u59cb\u8c03\u8bd5\u4ee5\u68c0\u67e5\u4ee3\u7801\u6267\u884c\u8fc7\u7a0b\u4e2d\u7684\u95ee\u9898\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728Atom\u4e2d\u8f7b\u677e\u8fd0\u884c\u548c\u8c03\u8bd5Python\u4ee3\u7801\u3002\u6839\u636e\u81ea\u5df1\u7684\u4f7f\u7528\u4e60\u60ef\u548c\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u6709\u52a9\u4e8e\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u4e13\u4e1a\u5f00\u53d1\u8005\uff0c\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\u90fd\u80fd\u4e3a\u4f60\u5e26\u6765\u4fbf\u5229\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Atom\u4e2d\u5b89\u88c5Python\u63d2\u4ef6\uff1f<\/strong><br \/>\u8981\u5728Atom\u4e2d\u8fd0\u884cPython\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u76f8\u5e94\u7684\u63d2\u4ef6\u3002\u63a8\u8350\u4f7f\u7528\u201cscript\u201d\u63d2\u4ef6\uff0c\u8fd9\u6837\u53ef\u4ee5\u76f4\u63a5\u5728Atom\u4e2d\u6267\u884cPython\u4ee3\u7801\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00Atom\uff0c\u70b9\u51fb\u201cFile\u201d &gt; \u201cSettings\u201d &gt; \u201cInstall\u201d\uff0c\u7136\u540e\u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u201cscript\u201d\u6765\u627e\u5230\u5e76\u5b89\u88c5\u6b64\u63d2\u4ef6\u3002<\/p>\n<p><strong>Atom\u4e2d\u5982\u4f55\u914d\u7f6ePython\u7684\u73af\u5883\uff1f<\/strong><br \/>\u5728Atom\u4e2d\u8fd0\u884cPython\u4ee3\u7801\u524d\uff0c\u786e\u4fdd\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u5b89\u88c5Python\u3002\u53ef\u4ee5\u5728Python\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u786e\u4fdd\u5c06Python\u7684\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbfAtom\u80fd\u591f\u8bc6\u522b\u3002<\/p>\n<p><strong>\u5728Atom\u4e2d\u6267\u884cPython\u4ee3\u7801\u7684\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5728\u5b89\u88c5\u597d\u5fc5\u8981\u7684\u63d2\u4ef6\u540e\uff0c\u60a8\u53ef\u4ee5\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5e76\u5c06\u5176\u4fdd\u5b58\u4e3a<code>.py<\/code>\u683c\u5f0f\u3002\u8f93\u5165\u60a8\u7684Python\u4ee3\u7801\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl + Shift + B<\/code>\u6765\u8fd0\u884c\u4ee3\u7801\u3002\u8fd0\u884c\u7ed3\u679c\u5c06\u663e\u793a\u5728\u5e95\u90e8\u7684\u63a7\u5236\u53f0\u7a97\u53e3\u4e2d\uff0c\u8fd9\u6837\u60a8\u53ef\u4ee5\u65b9\u4fbf\u5730\u67e5\u770b\u8f93\u51fa\u548c\u8c03\u8bd5\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Atom\u4e2d\u8fd0\u884cPython\u4ee3\u7801\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4e3b\u8981\u5305\u62ec\uff1a\u4f7f\u7528\u7ec8\u7aef\u63d2\u4ef6\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\u63d2\u4ef6\u3001\u4f7f\u7528\u5916\u90e8\u7ec8\u7aef\u3002\u5176\u4e2d\uff0c\u63a8\u8350 [&hellip;]","protected":false},"author":3,"featured_media":982136,"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\/982125"}],"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=982125"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/982125\/revisions"}],"predecessor-version":[{"id":982137,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/982125\/revisions\/982137"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/982136"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=982125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=982125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=982125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}