{"id":20739,"date":"2024-11-19T15:40:56","date_gmt":"2024-11-19T07:40:56","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20739\/"},"modified":"2024-11-19T15:40:56","modified_gmt":"2024-11-19T07:40:56","slug":"%e5%a6%82%e4%bd%95%e7%94%a8sublime%e8%bf%90%e8%a1%8cpython","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20739\/","title":{"rendered":"\u5982\u4f55\u7528sublime\u8fd0\u884cpython"},"content":{"rendered":"<blockquote><p>\n  \u5728 sublime text \u4e2d\u8fd0\u884c python \u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 python \u89e3\u91ca\u5668\u548c sublime text \u7684 python \u63d2\u4ef6\u3002\u914d\u7f6e sublime text \u4f7f\u7528\u6b63\u786e\u7684 python \u89e3\u91ca\u5668\u3002\u521b\u5efa .py \u6587\u4ef6\u7f16\u5199 python \u4ee3\u7801\u3002\u6309 f5 \u6216\u8f93\u5165 python_run \u547d\u4ee4\u8fd0\u884c\u4ee3\u7801\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040316511944125.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528sublime\u8fd0\u884cpython\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528sublime\u8fd0\u884cpython\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u7528 Sublime Text \u8fd0\u884c Python<\/strong><\/p>\n<p>Sublime Text \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u5f00\u53d1\u3002\u8981\u8fd0\u884c Python \u4ee3\u7801\uff0c\u9700\u8981\u5b89\u88c5 Python \u89e3\u91ca\u5668\u548c Sublime Text \u7684 Python \u63d2\u4ef6\u3002<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668<\/strong><\/p>\n<p>\u8bbf\u95ee Python \u5b98\u65b9\u7f51\u7ad9\uff08https:\/\/www..org\/\uff09\u5e76\u4e0b\u8f7d\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5339\u914d\u7684 Python \u89e3\u91ca\u5668\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd\u5c06 Python \u6dfb\u52a0\u5230\u60a8\u7684\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u5b89\u88c5 Sublime Text \u7684 Python \u63d2\u4ef6<\/strong><\/p>\n<p>\u6253\u5f00 Sublime Text\uff0c\u7136\u540e\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00\u201cPackage Control\u201d\u63a7\u5236\u53f0\uff08Ctrl + Shift + P\uff09<\/li>\n<li>\u8f93\u5165\u201cInstall Package\u201d<\/li>\n<li>\u4ece\u5217\u8868\u4e2d\u9009\u62e9\u201cPython\u201d\u63d2\u4ef6<\/li>\n<\/ol>\n<p><strong>\u6b65\u9aa4 3\uff1a\u914d\u7f6e Python \u89e3\u91ca\u5668<\/strong><\/p>\n<p>\u5b89\u88c5\u63d2\u4ef6\u540e\uff0c\u9700\u8981\u914d\u7f6e Sublime Text \u4ee5\u4f7f\u7528\u6b63\u786e\u7684 Python \u89e3\u91ca\u5668\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 Sublime Text \u7684\u201cPreferences\u201d\u6587\u4ef6\uff08Ctrl + ,\uff09<\/li>\n<li>\u627e\u5230\u201cSettings &#8211; Default\u201d\u90e8\u5206<\/li>\n<li>\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/li>\n<\/ol>\n<pre>\"python_interpreter\": \"\/path\/to\/your\/python\/interpreter\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06 \/path\/to\/your\/python\/interpreter \u66ff\u6362\u4e3a Python \u89e3\u91ca\u5668\u7684\u5b9e\u9645\u8def\u5f84\u3002<\/p>\n<p><strong>\u6b65\u9aa4 4\uff1a\u8fd0\u884c Python \u4ee3\u7801<\/strong><\/p>\n<p>\u73b0\u5728\u60a8\u5df2\u914d\u7f6e\u597d Sublime Text\uff0c\u53ef\u4ee5\u5f00\u59cb\u8fd0\u884c Python \u4ee3\u7801\uff1a<\/p>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 .py \u6587\u4ef6<\/li>\n<li>\u7f16\u5199\u60a8\u7684 Python \u4ee3\u7801<\/li>\n<li>\u6309 F5 \u952e\u6216\u5728\u547d\u4ee4\u9762\u677f\u4e2d\u8f93\u5165 python_run \u4ee5\u8fd0\u884c\u4ee3\u7801<\/li>\n<\/ol>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u60a8\u53ef\u4ee5\u5728 Sublime Text \u7684\u63a7\u5236\u53f0\u4e2d\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u3002<\/li>\n<li>\u53ef\u4ee5\u4f7f\u7528 python_pass \u547d\u4ee4\u5728\u4e0d\u8fd0\u884c\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\u5c06\u5149\u6807\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u9519\u8bef\u3002<\/li>\n<li>Sublime Text \u63d0\u4f9b\u4e86\u8c03\u8bd5\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u67e5\u627e\u5e76\u4fee\u590d\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528\u8fd0\u884c\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 sublime text \u4e2d\u8fd0\u884c python \u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 python \u89e3\u91ca\u5668\u548c sublime text \u7684 python \u63d2\u4ef6\u3002\u914d\u7f6e sublime text \u4f7f\u7528\u6b63\u786e\u7684 python \u89e3\u91ca\u5668\u3002\u521b\u5efa .py \u6587\u4ef6\u7f16\u5199 python \u4ee3\u7801\u3002\u6309 f5 \u6216\u8f93\u5165 python_run \u547d\u4ee4\u8fd0\u884c\u4ee3\u7801\u3002 \u5982\u4f55\u7528 Sublime Text \u8fd0\u884c Python Sublime Text \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u5f00\u53d1\u3002\u8981\u8fd0\u884c Python \u4ee3\u7801\uff0c\u9700\u8981\u5b89\u88c5 Python \u89e3\u91ca\u5668\u548c Sublime Text \u7684 Python \u63d2\u4ef6\u3002 \u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668 \u8bbf\u95ee Python \u5b98\u65b9\u7f51\u7ad9\uff08https:\/\/www..org\/\uff09\u5e76\u4e0b\u8f7d\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5339\u914d\u7684 Python \u89e3\u91ca\u5668\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd\u5c06 Python \u6dfb\u52a0\u5230\u60a8\u7684\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20739","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20739"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20739\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}