{"id":988768,"date":"2024-12-27T08:05:11","date_gmt":"2024-12-27T00:05:11","guid":{"rendered":""},"modified":"2024-12-27T08:05:13","modified_gmt":"2024-12-27T00:05:13","slug":"%e5%a6%82%e4%bd%95%e7%94%a8vscode%e6%89%93%e5%bc%80python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/988768.html","title":{"rendered":"\u5982\u4f55\u7528vscode\u6253\u5f00python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064254\/7b1b38a0-c273-4548-9b9e-b49b0b498c42.webp\" alt=\"\u5982\u4f55\u7528vscode\u6253\u5f00python\" \/><\/p>\n<p><p> <strong>\u8981\u5728VSCode\u4e2d\u6253\u5f00Python\uff0c\u4f60\u9700\u8981\u5b89\u88c5Python\u6269\u5c55\u3001\u914d\u7f6ePython\u89e3\u91ca\u5668\u3001\u521b\u5efa\u5e76\u6253\u5f00Python\u6587\u4ef6<\/strong>\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u5b89\u88c5Python\u548cVSCode\u3002\u7136\u540e\uff0c\u5728VSCode\u4e2d\u5b89\u88c5Python\u6269\u5c55\uff0c\u5e76\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u3002\u63a5\u7740\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u5e76\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u3002<strong>\u5b89\u88c5Python\u6269\u5c55\u662f\u5173\u952e\u6b65\u9aa4\u4e4b\u4e00\uff0c\u5b83\u63d0\u4f9b\u4e86\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd<\/strong>\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5VSCode\u548cPython<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528VSCode\u6253\u5f00Python\u6587\u4ef6\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u5b89\u88c5Python\u548cVSCode\u3002Python\u53ef\u4ee5\u5728\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\uff0c\u800cVSCode\u5219\u53ef\u4ee5\u5728\u5fae\u8f6f\u7684\u5b98\u65b9\u7f51\u7ad9\u83b7\u53d6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong><br \/>\u524d\u5f80Python\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684Python\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5VSCode<\/strong><br \/>\u8bbf\u95eeVSCode\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u53ea\u9700\u6309\u7167\u63d0\u793a\u8fdb\u884c\u64cd\u4f5c\u5373\u53ef\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5b89\u88c5Python\u6269\u5c55<\/p>\n<\/p>\n<p><p>VSCode\u672c\u8eab\u5e76\u4e0d\u76f4\u63a5\u652f\u6301Python\u7f16\u7a0b\uff0c\u56e0\u6b64\u9700\u8981\u901a\u8fc7\u6269\u5c55\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u6269\u5c55\u9762\u677f<\/strong><br \/>\u5728VSCode\u5de6\u4fa7\u5de5\u5177\u680f\u4e2d\uff0c\u70b9\u51fb\u201c\u6269\u5c55\u201d\u56fe\u6807\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+Shift+X<\/code>\u6253\u5f00\u6269\u5c55\u9762\u677f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u641c\u7d22\u5e76\u5b89\u88c5Python\u6269\u5c55<\/strong><br \/>\u5728\u6269\u5c55\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cPython\u201d\uff0c\u627e\u5230\u7531Microsoft\u53d1\u5e03\u7684Python\u6269\u5c55\uff0c\u5e76\u70b9\u51fb\u201c\u5b89\u88c5\u201d\u6309\u94ae\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u5b89\u88c5Python\u6269\u5c55\u540e\uff0cVSCode\u5c06\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u7b49\u529f\u80fd\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e09\u3001\u914d\u7f6ePython\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8cPython\u6269\u5c55\u540e\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u914d\u7f6ePython\u89e3\u91ca\u5668\uff0c\u4ee5\u4fbfVSCode\u8bc6\u522bPython\u73af\u5883\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u9762\u677f<\/strong><br \/>\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+Shift+P<\/code>\u6253\u5f00\u547d\u4ee4\u9762\u677f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9Python\u89e3\u91ca\u5668<\/strong><br \/>\u5728\u547d\u4ee4\u9762\u677f\u4e2d\u8f93\u5165\u201cPython: Select Interpreter\u201d\uff0c\u7136\u540e\u9009\u62e9\u4f60\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u5f88\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u51b3\u5b9a\u4e86\u4ee3\u7801\u8fd0\u884c\u7684\u73af\u5883\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u56db\u3001\u521b\u5efa\u5e76\u6253\u5f00Python\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u73b0\u5728\uff0c\u4f60\u5df2\u7ecf\u51c6\u5907\u597d\u5728VSCode\u4e2d\u521b\u5efa\u5e76\u6253\u5f00Python\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u6587\u4ef6<\/strong><br \/>\u70b9\u51fb\u201c\u6587\u4ef6\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201c\u65b0\u6587\u4ef6\u201d\u9009\u9879\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+N<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u6587\u4ef6\u4e3a.py<\/strong><br \/>\u4fdd\u5b58\u8be5\u6587\u4ef6\uff0c\u5e76\u786e\u4fdd\u6587\u4ef6\u6269\u5c55\u540d\u4e3a\u201c.py\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199Python\u4ee3\u7801<\/strong><br \/>\u5728\u65b0\u521b\u5efa\u7684Python\u6587\u4ef6\u4e2d\u8f93\u5165Python\u4ee3\u7801\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u8fd0\u884cPython\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u6700\u540e\u4e00\u6b65\u662f\u8fd0\u884c\u4f60\u6240\u7f16\u5199\u7684Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u7ec8\u7aef<\/strong><br \/>\u70b9\u51fb\u201c\u7ec8\u7aef\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201c\u65b0\u5efa\u7ec8\u7aef\u201d\u9009\u9879\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e`Ctrl+&#8220;\u6253\u5f00\u7ec8\u7aef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u4ee3\u7801<\/strong><br \/>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u8fd0\u884cPython\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python filename.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u786e\u4fdd\u5c06<code>filename.py<\/code>\u66ff\u6362\u4e3a\u4f60\u7684\u5b9e\u9645\u6587\u4ef6\u540d\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728VSCode\u4e2d\u8f7b\u677e\u6253\u5f00\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u516d\u3001\u4f7f\u7528\u8c03\u8bd5\u529f\u80fd<\/p>\n<\/p>\n<p><p>VSCode\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u8c03\u8bd5\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u5f00\u53d1Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u65ad\u70b9<\/strong><br \/>\u5728\u4ee3\u7801\u884c\u53f7\u65c1\u8fb9\u70b9\u51fb\uff0c\u8bbe\u7f6e\u65ad\u70b9\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8\u8c03\u8bd5<\/strong><br \/>\u70b9\u51fb\u5de6\u4fa7\u5de5\u5177\u680f\u4e2d\u7684\u201c\u8c03\u8bd5\u201d\u56fe\u6807\uff0c\u9009\u62e9\u201c\u542f\u52a8\u8c03\u8bd5\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u53d8\u91cf\u548c\u5806\u6808<\/strong><br \/>\u5728\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u53ef\u4ee5\u67e5\u770b\u53d8\u91cf\u7684\u503c\u548c\u8c03\u7528\u5806\u6808\uff0c\u65b9\u4fbf\u67e5\u627e\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u8c03\u8bd5\u529f\u80fd\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u5feb\u901f\u53d1\u73b0\u5e76\u89e3\u51b3\u95ee\u9898\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e03\u3001\u4f7f\u7528\u4ee3\u7801\u683c\u5f0f\u5316\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u4fdd\u6301\u4ee3\u7801\u7684\u4e00\u81f4\u6027\u548c\u53ef\u8bfb\u6027\uff0c\u5efa\u8bae\u4f7f\u7528\u4ee3\u7801\u683c\u5f0f\u5316\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5\u683c\u5f0f\u5316\u5de5\u5177<\/strong><br \/>\u5728\u547d\u4ee4\u9762\u677f\u4e2d\uff0c\u8f93\u5165\u201cPython: Select Linter\u201d\uff0c\u9009\u62e9\u4e00\u4e2a\u683c\u5f0f\u5316\u5de5\u5177\uff0c\u5982<code>autopep8<\/code>\u6216<code>black<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u683c\u5f0f\u5316\u4ee3\u7801<\/strong><br \/>\u4f7f\u7528\u5feb\u6377\u952e<code>Shift+Alt+F<\/code>\u683c\u5f0f\u5316\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u826f\u597d\u7684\u4ee3\u7801\u683c\u5f0f\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u516b\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u9694\u79bb\u9879\u76ee\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><br \/>\u5728\u7ec8\u7aef\u4e2d\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv env<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\\env\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Unix\u6216MacOS\u4e0a\uff0c\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source env\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56<\/strong><br \/>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u51b2\u7a81\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e5d\u3001\u4f7f\u7528\u7248\u672c\u63a7\u5236<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982Git\uff09\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7ba1\u7406\u4ee3\u7801\u7248\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521d\u59cb\u5316Git\u4ed3\u5e93<\/strong><br \/>\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u8f93\u5165<code>git init<\/code>\uff0c\u521d\u59cb\u5316Git\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63d0\u4ea4\u4ee3\u7801<\/strong><br \/>\u6dfb\u52a0\u4ee3\u7801\u5230Git\u6682\u5b58\u533a\u5e76\u63d0\u4ea4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git add .<\/p>\n<p>git commit -m &quot;Initial commit&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93<\/strong><br \/>\u5c06\u672c\u5730\u4ee3\u7801\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\uff08\u5982GitHub\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8ddf\u8e2a\u4ee3\u7801\u5386\u53f2\uff0c\u5e76\u4e0e\u56e2\u961f\u534f\u4f5c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5341\u3001\u4f7f\u7528\u6269\u5c55\u63d0\u9ad8\u751f\u4ea7\u529b<\/p>\n<\/p>\n<p><p>VSCode\u63d0\u4f9b\u4e86\u5927\u91cf\u6269\u5c55\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4f60\u7684\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u641c\u7d22\u6269\u5c55<\/strong><br \/>\u5728\u6269\u5c55\u9762\u677f\u4e2d\u641c\u7d22\u4e0e\u4f60\u7684\u9700\u6c42\u76f8\u5173\u7684\u6269\u5c55\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u6269\u5c55<\/strong><br \/>\u9009\u62e9\u5e76\u5b89\u88c5\u5408\u9002\u7684\u6269\u5c55\uff0c\u4f8b\u5982GitLens\u3001Prettier\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u5408\u9002\u7684\u6269\u5c55\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u4f60\u7684\u5f00\u53d1\u6548\u7387\u548c\u4f53\u9a8c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728VSCode\u4e2d\u9ad8\u6548\u5730\u6253\u5f00\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4eab\u53d7\u73b0\u4ee3\u5316IDE\u5e26\u6765\u7684\u4fbf\u5229\u548c\u5f3a\u5927\u529f\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728VSCode\u4e2d\u521b\u5efa\u65b0\u7684Python\u6587\u4ef6\uff1f<\/strong><br \/>\u5728VSCode\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u5de6\u4fa7\u6d3b\u52a8\u680f\u4e2d\u7684\u201c<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5668\u201d\u56fe\u6807\uff0c\u7136\u540e\u9009\u62e9\u201c\u65b0\u5efa\u6587\u4ef6\u201d\u6309\u94ae\uff0c\u8f93\u5165\u6587\u4ef6\u540d\u5e76\u4ee5\u201c.py\u201d\u7ed3\u5c3e\u6765\u521b\u5efa\u65b0\u7684Python\u6587\u4ef6\u3002\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u6269\u5c55\uff0c\u4ee5\u4fbf\u83b7\u5f97\u8bed\u6cd5\u9ad8\u4eae\u548c\u4ee3\u7801\u63d0\u793a\u529f\u80fd\u3002<\/p>\n<p><strong>\u5728VSCode\u4e2d\u5982\u4f55\u8fd0\u884cPython\u4ee3\u7801\uff1f<\/strong><br \/>\u8981\u8fd0\u884cPython\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u7f16\u8f91\u5668\u4e2d\u6253\u5f00\u60a8\u7684Python\u6587\u4ef6\uff0c\u7136\u540e\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9\u201c\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884cPython\u6587\u4ef6\u201d\u9009\u9879\u3002\u53e6\u4e00\u79cd\u65b9\u5f0f\u662f\u4f7f\u7528\u5feb\u6377\u952e\u201cCtrl + F5\u201d\u76f4\u63a5\u8fd0\u884c\u4ee3\u7801\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u60a8\u5df2\u7ecf\u914d\u7f6e\u597dPython\u73af\u5883\uff0c\u4ee5\u786e\u4fdd\u8fd0\u884c\u987a\u5229\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728VSCode\u4e2d\u8bbe\u7f6ePython\u89e3\u91ca\u5668\uff1f<\/strong><br \/>\u4e3a\u4e86\u8bbe\u7f6ePython\u89e3\u91ca\u5668\uff0c\u60a8\u53ef\u4ee5\u6309\u4e0b\u201cCtrl + Shift + P\u201d\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u8f93\u5165\u201cPython: Select Interpreter\u201d\u5e76\u9009\u62e9\u60a8\u6240\u9700\u7684Python\u7248\u672c\u3002\u8bbe\u7f6e\u6b63\u786e\u7684\u89e3\u91ca\u5668\u53ef\u4ee5\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u5728\u6b63\u786e\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u907f\u514d\u56e0\u7248\u672c\u4e0d\u517c\u5bb9\u800c\u5bfc\u81f4\u7684\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728VSCode\u4e2d\u6253\u5f00Python\uff0c\u4f60\u9700\u8981\u5b89\u88c5Python\u6269\u5c55\u3001\u914d\u7f6ePython\u89e3\u91ca\u5668\u3001\u521b\u5efa\u5e76\u6253\u5f00Python [&hellip;]","protected":false},"author":3,"featured_media":988773,"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\/988768"}],"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=988768"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/988768\/revisions"}],"predecessor-version":[{"id":988775,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/988768\/revisions\/988775"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/988773"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=988768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=988768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=988768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}