{"id":21271,"date":"2024-11-19T17:25:55","date_gmt":"2024-11-19T09:25:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21271\/"},"modified":"2024-11-19T17:25:55","modified_gmt":"2024-11-19T09:25:55","slug":"vscode%e6%80%8e%e4%b9%88%e6%89%a7%e8%a1%8cpython","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21271\/","title":{"rendered":"vscode\u600e\u4e48\u6267\u884cpython"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u6267\u884c python \u6709\u4e24\u79cd\u65b9\u6cd5\uff1a\u901a\u8fc7\u96c6\u6210\u7ec8\u7aef\uff0c\u4f7f\u7528 python .py \u547d\u4ee4\u3002\u901a\u8fc7\u8c03\u8bd5\u5668\uff0c\u70b9\u51fb\u201c\u8fd0\u884c\u201d&gt;\u201c\u542f\u52a8\u8c03\u8bd5\u201d\u4ee5\u8fd0\u884c\u4ee3\u7801\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051505452362390.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u6267\u884cpython\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u6267\u884cpython\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u6267\u884c Python<\/strong><\/p>\n<p>\u5728 VSCode \u4e2d\u6267\u884c Python \u6709\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \u901a\u8fc7\u96c6\u6210\u7ec8\u7aef<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VSCode\uff0c\u5e76\u6253\u5f00\u60a8\u8981\u8fd0\u884c Python \u4ee3\u7801\u7684\u6587\u4ef6\u3002<\/li>\n<li>\u5728\u83dc\u5355\u680f\u4e2d\uff0c\u70b9\u51fb\u201c\u7ec8\u7aef\uff08Terminal\uff09\u201d&gt;\u201c\u65b0\u5efa\u96c6\u6210\u7ec8\u7aef\uff08New Integrated Terminal\uff09\u201d\u3002<\/li>\n<li>\u5728\u7ec8\u7aef\u4e2d\uff0c\u8fdb\u5165\u5305\u542b Python \u4ee3\u7801\u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/li>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6267\u884c Python \u4ee3\u7801\uff1a<\/li>\n<\/ul>\n<pre>python &lt;\u6587\u4ef6\u540d\u79f0&gt;.py<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>python my_code.py<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u901a\u8fc7\u8c03\u8bd5\u5668<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VSCode\uff0c\u5e76\u6253\u5f00\u60a8\u8981\u8fd0\u884c Python \u4ee3\u7801\u7684\u6587\u4ef6\u3002<\/li>\n<li>\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684\u201c\u8fd0\u884c\uff08Run\uff09\u201d&gt;\u201c\u542f\u52a8\u8c03\u8bd5\uff08Start Debugging\uff09\u201d\u3002<\/li>\n<li>VSCode \u5c06\u542f\u52a8\u8c03\u8bd5\u4f1a\u8bdd\u5e76\u8fd0\u884c\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u9644\u52a0\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u60a8\u5df2\u6b63\u786e\u5b89\u88c5 Python\u3002<\/li>\n<li>\u5982\u679c\u60a8\u4f7f\u7528\u4e0d\u540c\u7684 Python \u73af\u5883\uff0c\u8bf7\u5728 VSCode \u4e2d\u914d\u7f6e\u5b83\u3002<\/li>\n<li>\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e\uff08\u4f8b\u5982 F5\uff09\u542f\u52a8\u8c03\u8bd5\u4f1a\u8bdd\u3002<\/li>\n<li>\u53ef\u4ee5\u5728\u8c03\u8bd5\u63a7\u5236\u53f0\u4e2d\u67e5\u770b\u8f93\u51fa\u548c\u8c03\u8bd5\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u6267\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 vscode \u4e2d\u6267\u884c python \u6709\u4e24\u79cd\u65b9\u6cd5\uff1a\u901a\u8fc7\u96c6\u6210\u7ec8\u7aef\uff0c\u4f7f\u7528 python .py \u547d\u4ee4\u3002\u901a\u8fc7\u8c03\u8bd5\u5668\uff0c\u70b9\u51fb\u201c\u8fd0\u884c\u201d&gt;\u201c\u542f\u52a8\u8c03\u8bd5\u201d\u4ee5\u8fd0\u884c\u4ee3\u7801\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u6267\u884c Python \u5728 VSCode \u4e2d\u6267\u884c Python \u6709\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff1a 1. \u901a\u8fc7\u96c6\u6210\u7ec8\u7aef \u6253\u5f00 VSCode\uff0c\u5e76\u6253\u5f00\u60a8\u8981\u8fd0\u884c Python \u4ee3\u7801\u7684\u6587\u4ef6\u3002 \u5728\u83dc\u5355\u680f\u4e2d\uff0c\u70b9\u51fb\u201c\u7ec8\u7aef\uff08Terminal\uff09\u201d&gt;\u201c\u65b0\u5efa\u96c6\u6210\u7ec8\u7aef\uff08New Integrated Terminal\uff09\u201d\u3002 \u5728\u7ec8\u7aef\u4e2d\uff0c\u8fdb\u5165\u5305\u542b Python \u4ee3\u7801\u6587\u4ef6\u7684\u76ee\u5f55\u3002 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6267\u884c Python \u4ee3\u7801\uff1a python &lt;\u6587\u4ef6\u540d\u79f0&gt;.py \u767b\u5f55\u540e\u590d\u5236 \u793a\u4f8b\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b python my_code.py \u767b\u5f55\u540e\u590d\u5236 2. \u901a\u8fc7\u8c03\u8bd5\u5668 \u6253\u5f00 VSCode\uff0c\u5e76\u6253\u5f00\u60a8\u8981\u8fd0\u884c Python \u4ee3\u7801\u7684\u6587\u4ef6\u3002 \u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684\u201c\u8fd0\u884c\uff08Run\uff09\u201d&gt;\u201c\u542f\u52a8\u8c03\u8bd5\uff08Start Debugging\uff09\u201d\u3002 VSCode \u5c06\u542f\u52a8\u8c03\u8bd5\u4f1a\u8bdd\u5e76\u8fd0\u884c\u4ee3\u7801\u3002 \u9644\u52a0\u63d0\u793a\uff1a \u786e\u4fdd\u60a8\u5df2\u6b63\u786e\u5b89\u88c5 Python\u3002 \u5982\u679c\u60a8\u4f7f\u7528\u4e0d\u540c\u7684 Python [&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-21271","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21271","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=21271"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21271\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}