{"id":21413,"date":"2024-11-19T17:52:22","date_gmt":"2024-11-19T09:52:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21413\/"},"modified":"2024-11-19T17:52:22","modified_gmt":"2024-11-19T09:52:22","slug":"vscode%e6%80%8e%e4%b9%88%e8%a3%85python%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21413\/","title":{"rendered":"vscode\u600e\u4e48\u88c5python\u73af\u5883"},"content":{"rendered":"<blockquote><p>\n  \u5728 visual studio code \u4e2d\u6b63\u786e\u8bbe\u7f6e python \u73af\u5883\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 python \u89e3\u91ca\u5668\u5c06 python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u5b89\u88c5 python \u6269\u5c55\u68c0\u67e5\u5b89\u88c5\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/27\/2024052715271641013.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u88c5python\u73af\u5883\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u88c5python\u73af\u5883\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8bbe\u7f6e Python \u73af\u5883<\/strong><\/p>\n<h3>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5 Python \u89e3\u91ca\u5668\u3002\u524d\u5f80 Python \u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff1ahttps:\/\/www..org\/downloads\/<\/p>\n<h3>\u6b65\u9aa4 2\uff1a\u5c06 Python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84<\/h3>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5c06 Python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\uff0c\u4ee5\u4fbf Visual Studio Code \u53ef\u4ee5\u627e\u5230\u5b83\u3002<\/p>\n<p>\u5728 Windows \u4e0a\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027\uff08\u6309 Win + R \u5e76\u8f93\u5165 sysdm.cpl\uff09<\/li>\n<li>\u9009\u62e9\u201c\u9ad8\u7ea7\u201d\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e0b\uff0c\u67e5\u627e Path \u53d8\u91cf<\/li>\n<li>\n<p>\u5355\u51fb\u201c\u7f16\u8f91\u201d\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u8def\u5f84\uff08\u7528 Python \u5b89\u88c5\u76ee\u5f55\u66ff\u6362 \uff09\uff1a <\/p>\n<pre>;C:&lt;Python Path&gt;Scripts<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p>\u5728 Mac \u4e0a\uff1a<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef<\/li>\n<li>\n<p>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>export PATH=\/usr\/local\/bin:$PATH<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 3\uff1a\u5b89\u88c5 Python \u6269\u5c55<\/h3>\n<p>\u6253\u5f00 Visual Studio Code\uff0c\u7136\u540e\u5b89\u88c5 Python \u6269\u5c55\u3002<\/p>\n<ul>\n<li>\u70b9\u51fb\u5de6\u4fa7\u8fb9\u680f\u4e2d\u7684\u6269\u5c55\u56fe\u6807<\/li>\n<li>\u641c\u7d22\u201cPython\u201d<\/li>\n<li>\u5355\u51fb\u201c\u5b89\u88c5\u201d\u6309\u94ae<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 4\uff1a\u68c0\u67e5\u5b89\u88c5<\/h3>\n<p>\u4e3a\u4e86\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\uff0c\u60a8\u53ef\u4ee5\u5728 Visual Studio Code \u4e2d\u6253\u5f00\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\u5e76\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>print(\"Hello, world!\")<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\u6309 Ctrl + Shift + B \u8fd0\u884c\u4ee3\u7801\u3002\u5982\u679c\u8f93\u51fa\u201cHello, world!\u201d\uff0c\u5219\u8868\u660e Python \u73af\u5883\u5df2\u6b63\u786e\u8bbe\u7f6e\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u88c5\u73af\u5883\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 visual studio code \u4e2d\u6b63\u786e\u8bbe\u7f6e python \u73af\u5883\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 python \u89e3\u91ca\u5668\u5c06 python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u5b89\u88c5 python \u6269\u5c55\u68c0\u67e5\u5b89\u88c5 \u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8bbe\u7f6e Python \u73af\u5883 \u6b65\u9aa4 1\uff1a\u5b89\u88c5 Python \u89e3\u91ca\u5668 \u9996\u5148\uff0c\u60a8\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5 Python \u89e3\u91ca\u5668\u3002\u524d\u5f80 Python \u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff1ahttps:\/\/www..org\/downloads\/ \u6b65\u9aa4 2\uff1a\u5c06 Python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5c06 Python \u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\uff0c\u4ee5\u4fbf Visual Studio Code \u53ef\u4ee5\u627e\u5230\u5b83\u3002 \u5728 Windows \u4e0a\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u6253\u5f00\u7cfb\u7edf\u5c5e\u6027\uff08\u6309 Win + R \u5e76\u8f93\u5165 sysdm.cpl\uff09 \u9009\u62e9\u201c\u9ad8\u7ea7\u201d\u9009\u9879\u5361 \u5355\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae \u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e0b\uff0c\u67e5\u627e Path \u53d8\u91cf [&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-21413","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21413","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=21413"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21413\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}