{"id":21627,"date":"2024-11-19T14:28:32","date_gmt":"2024-11-19T06:28:32","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21627\/"},"modified":"2024-11-19T14:28:32","modified_gmt":"2024-11-19T06:28:32","slug":"vscode%e5%a6%82%e4%bd%95%e7%bc%96%e8%af%91python","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21627\/","title":{"rendered":"vscode\u5982\u4f55\u7f16\u8bd1python"},"content":{"rendered":"<p><strong>\u5982\u4f55\u5728  \u4e2d\u7f16\u8bd1 <\/strong><\/p>\n<p>\u5728 VSCode \u4e2d\u7f16\u8bd1 Python \u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u5feb\u6377\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u5df2\u5728\u7cfb\u7edf\u4e0a\u5b89\u88c5 Python \u89e3\u91ca\u5668\u3002\u5982\u679c\u6ca1\u6709\uff0c\u8bf7\u8bbf\u95ee python.org \u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 2\uff1a\u521b\u5efa VSCode \u5de5\u4f5c\u533a<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VSCode \u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u5de5\u4f5c\u533a\u3002\u6587\u4ef6 &gt; \u6253\u5f00\u6587\u4ef6\u5939&#8230;<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 3\uff1a\u521b\u5efa Python \u6587\u4ef6<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u5728\u5de5\u4f5c\u533a\u5185\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\u3002\u4f8b\u5982\uff0c&#8221;my_program.py&#8221;\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 4\uff1a\u7f16\u5199 Python \u4ee3\u7801<\/strong><\/p>\n<ul>\n<li>\u5728 Python \u6587\u4ef6\u4e2d\u7f16\u5199\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 5\uff1a\u6309 F5 \u7f16\u8bd1\u5e76\u8fd0\u884c\u7a0b\u5e8f<\/strong><\/p>\n<ul>\n<li>\u6309 F5 \u7f16\u8bd1\u5e76\u8fd0\u884c\u7a0b\u5e8f\u3002VSCode \u5c06\u4f7f\u7528\u9ed8\u8ba4\u89e3\u91ca\u5668\u8fd0\u884c\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u7f16\u8bd1\u9009\u9879\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u4f7f\u7528 Code Runner \u6269\u5c55\uff1a<\/strong>\u5b89\u88c5 Code Runner \u6269\u5c55\uff0c\u53ef\u4ee5\u5728 VSCode \u4e2d\u76f4\u63a5\u8fd0\u884c\u548c\u8c03\u8bd5\u4ee3\u7801\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u7ec8\u7aef\uff1a<\/strong>\u6253\u5f00\u96c6\u6210\u7ec8\u7aef\uff08\u7ec8\u7aef &gt; \u65b0\u5efa\u7ec8\u7aef\uff09\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u7f16\u8bd1\uff1a<\/li>\n<\/ul>\n<pre>python my_program.py<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u5728\u7f16\u8bd1\u65f6\u9047\u5230\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u4ee3\u7801\u8bed\u6cd5\u5e76\u786e\u4fdd Python \u89e3\u91ca\u5668\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/li>\n<li>VSCode \u4e2d\u9ed8\u8ba4\u4f7f\u7528\u7684 Python \u89e3\u91ca\u5668\u662f\u7cfb\u7edf\u4e2d\u5b89\u88c5\u7684\u9ed8\u8ba4\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574 settings.json \u6587\u4ef6\u6765\u66f4\u6539\u89e3\u91ca\u5668\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7f16\u8bd1\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>\u5982\u4f55\u5728 \u4e2d\u7f16\u8bd1 \u5728 VSCode \u4e2d\u7f16\u8bd1 Python \u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u5feb\u6377\uff1a \u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668 \u786e\u4fdd\u5df2\u5728\u7cfb\u7edf\u4e0a\u5b89\u88c5 Python \u89e3\u91ca\u5668\u3002\u5982\u679c\u6ca1\u6709\uff0c\u8bf7\u8bbf\u95ee python.org \u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002 \u6b65\u9aa4 2\uff1a\u521b\u5efa VSCode \u5de5\u4f5c\u533a \u6253\u5f00 VSCode \u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u5de5\u4f5c\u533a\u3002\u6587\u4ef6 &gt; \u6253\u5f00\u6587\u4ef6\u5939&#8230; \u6b65\u9aa4 3\uff1a\u521b\u5efa Python \u6587\u4ef6 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5728\u5de5\u4f5c\u533a\u5185\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\u3002\u4f8b\u5982\uff0c&#8221;my_program.py&#8221;\u3002 \u6b65\u9aa4 4\uff1a\u7f16\u5199 Python \u4ee3\u7801 \u5728 Python \u6587\u4ef6\u4e2d\u7f16\u5199\u4ee3\u7801\u3002 \u6b65\u9aa4 5\uff1a\u6309 F5 \u7f16\u8bd1\u5e76\u8fd0\u884c\u7a0b\u5e8f \u6309 F5 \u7f16\u8bd1\u5e76\u8fd0\u884c\u7a0b\u5e8f\u3002VSCode \u5c06\u4f7f\u7528\u9ed8\u8ba4\u89e3\u91ca\u5668\u8fd0\u884c\u4ee3\u7801\u3002 \u5176\u4ed6\u7f16\u8bd1\u9009\u9879\uff1a \u4f7f\u7528 Code Runner \u6269\u5c55\uff1a\u5b89\u88c5 Code Runner [&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-21627","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21627","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=21627"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21627\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}