{"id":89199,"date":"2021-09-28T15:05:45","date_gmt":"2021-09-28T07:05:45","guid":{"rendered":"http:\/\/www.zhushiyao.com\/?p=89199"},"modified":"2021-09-28T15:06:30","modified_gmt":"2021-09-28T07:06:30","slug":"537b6cbafa","status":"publish","type":"post","link":"http:\/\/www.zhushiyao.com\/?p=89199","title":{"rendered":"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<blockquote class=\"js_blockquote_wrap\">\n<section class=\"js_blockquote_digest\">\n<section>\n<p style=\"text-align: left;\"><span style=\"font-size: 14px;\">\u9009\u81ea Real Python\uff0c\u4f5c\u8005\uff1aJon Fincher<\/span><\/p>\n<\/section>\n<\/section>\n<\/blockquote>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<blockquote class=\"js_blockquote_wrap\">\n<section class=\"js_blockquote_digest\">\n<section style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5728 Windows \u4e0a\u600e\u6837\u505a Python \u5f00\u53d1\uff1f\u662f\u50cf\u5927\u795e\u90a3\u6837\u4f7f\u7528\u7eaf\u6587\u672c\u7f16\u8f91\u5668\uff0c\u8fd8\u662f\u7528\u66f4\u52a0\u5b8c\u5584\u7684 IDE\uff1f\u5230\u5e95\u662f\u7528\u81ea\u5e26\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u8fd8\u662f\u9700\u8981\u88c5\u65b0\u7684 Terminal\uff1f\u672c\u6587\u5c06\u5e26\u4f60\u4e86\u89e3\u5982\u4f55\u5229\u7528\u5fae\u8f6f\u5b98\u65b9\u7ef4\u62a4\u7684 MS Terminal \u4e0e VS Code\uff0c\u6765\u4e3a Python \u5f00\u53d1\u4fdd\u9a7e\u62a4\u822a\u3002<\/span><\/section>\n<\/section>\n<\/blockquote>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f7f\u7528 Windows \u7cfb\u7edf\u4e00\u5927\u597d\u5904\u662f\u5b83\u7684\u5e94\u7528\u592a\u4e30\u5bcc\u4e86\uff0c\u751a\u81f3\u5f3a\u5927\u7684 GPU \u4e5f\u80fd\u5728\u95f2\u6687\u65f6\u95f4\u505a\u70b9\u5176\u5b83\u300c\u5de5\u4f5c\u300d\u3002\u7136\u800c\u4e0e Linux \u6216 macOS \u4e0d\u540c\uff0c\u5728 Windows \u4e0a\u505a\u5f00\u53d1\u603b\u4f1a\u9047\u5230\u5f88\u591a\u6311\u6218\uff0c\u4e0d\u8bba\u662f\u6587\u4ef6\u7f16\u7801\u3001\u73af\u5883\u63a7\u5236\u8fd8\u662f\u9879\u76ee\u7f16\u8bd1\uff0c\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u603b\u4f1a\u6709\u4e00\u4e9b\u795e\u5947\u7684\u6536\u83b7\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u8fd9\u4e9b\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\u5c24\u5176\u7a81\u51fa\uff1a\u6211\u4eec\u5728\u5b89\u88c5\u67d0\u4e2a\u5e93\u65f6\u53ef\u80fd\u51fa\u73b0\u5404\u79cd\u4f9d\u8d56\u9879\u9519\u8bef\uff0c\u6211\u4eec\u5728\u8bfb\u5199\u6587\u672c\u65f6\u51fa\u73b0\u5404\u79cd\u7f16\u7801\u9519\u8bef\u7b49\u7b49\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u90a3\u4e48\u5728 Windows \u4e0a\u5982\u4f55\u505a Python \u5f00\u53d1\u5462\uff1f\u76f8\u4fe1\u5927\u795e\u4eec\u90fd\u4f1a\u6709\u81ea\u5df1\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4f46\u672c\u6587\u5e0c\u671b\u4ecb\u7ecd\u5fae\u8f6f\u5b98\u65b9\u53d1\u5e03\u7684 Terminal \u548c Visual Studio Code\uff0c\u5e0c\u671b\u5b83\u4eec\u80fd\u6784\u5efa\u66f4\u6d41\u7545\u7684 Windows \u5f00\u53d1\u4f53\u9a8c\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812745.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">Visual Studio Code \u662f\u7a0b\u5e8f\u5458\u53ef\u4ee5\u4f7f\u7528\u7684\u6700\u9177\u7684\u4ee3\u7801\u7f16\u8f91\u5668\u4e4b\u4e00\uff0c\u662f\u4e00\u4e2a\u53ef\u5728\u6240\u6709\u5e73\u53f0\u4e0a\u4f7f\u7528\u7684\u5f00\u6e90\u3001\u53ef\u6269\u5c55\u548c\u8f7b\u91cf\u7ea7\u7f16\u8f91\u5668\u3002\u6b63\u662f\u8fd9\u4e9b\u54c1\u8d28\u4f7f\u5fae\u8f6f\u7684 VS Code \u5927\u53d7\u6b22\u8fce\uff0c\u5e76\u6210\u4e3a Python \u5f00\u53d1\u7684\u7edd\u4f73\u5e73\u53f0\u3002\u53ef\u80fd\u5f88\u591a\u8bfb\u8005\u90fd\u6bd4\u8f83\u719f\u6089 PyCharm \u4e0e Jupyter Notebook \u7b49\u5e38\u89c1\u7684 Python IDE\uff0c\u4f46 VS Code \u4e00\u6837\u4e0d\u4f1a\u4ee4\u4f60\u5931\u671b\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728\u672c\u6587\u4e2d\uff0c\u4f60\u5c06\u5b66\u4e60\u5230\u5fae\u8f6f Terminal \u548c Visual Studio Code \u7684\u7279\u6027\uff0c\u5305\u62ec\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4ec0\u4e48\u662f\u5fae\u8f6f Terminal<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5fae\u8f6f Terminal \u6548\u679c\u600e\u4e48\u6837<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5b89\u88c5 Visual Studio Code<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u53d1\u73b0\u5e76\u5b89\u88c5\u00a0Python \u6269\u5c55<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u7f16\u5199\u7b80\u5355\u7684 Python \u5e94\u7528\u7a0b\u5e8f<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4e86\u89e3\u5982\u4f55\u5728 VS Code \u4e2d\u8fd0\u884c\u548c\u8c03\u8bd5\u73b0\u6709 Python \u7a0b\u5e8f<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5c06 VS Code \u8fde\u63a5\u5230 Git \u548c GitHub\uff0c\u4e0e\u5168\u4e16\u754c\u5206\u4eab\u4f60\u7684\u4ee3\u7801<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6211\u4eec\u5047\u8bbe\u4f60\u4e86\u89e3 Python \u5f00\u53d1\uff0c\u5e76\u4e14\u5df2\u7ecf\u5728\u7cfb\u7edf\u4e0a\u5b89\u88c5\u4e86\u67d0\u79cd\u7248\u672c\u7684 Python\uff08\u5982 Python 2.7\u3001Python 3.6\/3.7\u3001Anaconda \u6216\u5176\u4ed6\uff09\u3002\u7531\u4e8e VS Code \u53ef\u517c\u5bb9\u6240\u6709\u4e3b\u6d41\u5e73\u53f0\uff0c\u56e0\u6b64\u4f60\u53ef\u80fd\u4f1a\u770b\u5230\u7565\u6709\u4e0d\u540c\u7684 UI \u5143\u7d20\uff0c\u5e76\u4e14\u53ef\u80fd\u9700\u8981\u4fee\u6539\u67d0\u4e9b\u547d\u4ee4\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u65b0\u5174\u7684\u5fae\u8f6f Terminal<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">Windows Terminal \u662f\u4e00\u4e2a\u5f00\u6e90\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u7531\u5fae\u8f6f\u5728\u4eca\u5e74 5 \u6708\u4efd\u7684 Build \u5f00\u53d1\u8005\u5927\u4f1a\u4e0a\u63a8\u51fa\u3002MS Terminal \u652f\u6301 Command Prompt \u548c PowerShell \u7684\u6240\u6709\u4f18\u70b9\uff0c\u57fa\u672c\u4e0a\u547d\u4ee4\u884c\u5df2\u7ecf\u53ef\u4ee5\u548c Linux \u76f8\u878d\u5408\u4e86\uff0c\u9664\u6b64\u4e4b\u5916\u8fd0\u884c\u547d\u4ee4\u63d0\u793a\u7b26\u4e5f\u662f\u6ca1\u95ee\u9898\u7684\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728 MS Terminal \u5f00\u6e90\u540e\uff0cGitHub \u7684 Star \u91cf\u589e\u957f\u5f97\u975e\u5e38\u5feb\uff0c\u76ee\u524d\u5df2\u7ecf\u8d85\u8fc7\u4e86 5 \u4e07\u3002\u8fd9\u8db3\u4ee5\u8bf4\u660e\u8fd9\u4e2a\u9879\u76ee\u975e\u5e38\u53d7\u5173\u6ce8\uff0c\u5728\u793e\u533a\u7684\u5f00\u6e90\u6539\u8fdb\u4e0b\uff0c\u8fd9\u4e2a\u5de5\u5177\u4e00\u5b9a\u633a\u597d\u7528\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/1-1632812745.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px; color: #7b0c00;\">MS Terminal \u5f00\u6e90\u5730\u5740\uff1ahttps:\/\/github.com\/microsoft\/terminal<\/span><\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5f53\u7136\uff0c\u76ee\u524d MS Terminal \u5df2\u7ecf\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u5b89\u88c5\u7a0b\u5e8f\u4e86\uff0c\u793e\u533a\u7684\u4f53\u9a8c\u4e5f\u975e\u5e38\u4e0d\u9519\u3002\u56e0\u6b64\u5982\u679c\u6211\u4eec\u5728 Windows \u4e0a\u505a Python \u5f00\u53d1\uff0c\u547d\u4ee4\u884c\u5de5\u5177\u5c31\u53ef\u4ee5\u91c7\u7528 MS Terminal\uff0c\u5b83\u80fd\u89e3\u51b3\u5f88\u5927\u4e00\u90e8\u5206\u7684\u5305\u5b89\u88c5\u3001\u73af\u5883\u63a7\u5236\u7b49\u95ee\u9898\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><strong><span style=\"font-size: 15px;\">MS Terminal \u7684\u6548\u679c\u600e\u4e48\u6837<\/span><\/strong><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">MS Terminal \u6700\u6838\u5fc3\u7684\u529f\u80fd\u5c31\u662f\u652f\u6301\u591a\u6761\u9009\u9879\u5361\uff0c\u4e14\u6bcf\u4e00\u4e2a\u9009\u9879\u5361\u90fd\u53ef\u4ee5\u8fde\u63a5\u5230\u547d\u4ee4\u884c shell \u6216\u5e94\u7528\uff0c\u4f8b\u5982 Command Prompt \u6216\u901a\u8fc7 SSH \u8bbf\u95ee\u6811\u8393\u6d3e\u7b49\u3002\u4e0b\u56fe\u5c55\u793a\u4e86\u8fd9\u79cd\u591a\u9009\u9879\u5361\u7684\u652f\u6301\u60c5\u51b5\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/5-1632812745.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6b64\u5916\uff0c\u9664\u4e86\u529f\u80fd\u5916\uff0c\u66f4\u91cd\u8981\u7684\u5c31\u662f\u989c\u503c\uff0c\u5c31\u50cf\u6211\u4eec\u5e38\u7528 zsh \u6765\u63d0\u4f9b\u66f4\u7f8e\u89c2\u7684\u547d\u4ee4\u884c\u4e00\u6837\u3002\u867d\u7136 zsh \u76ee\u524d\u7684 GitHub \u6536\u85cf\u91cf\u5df2\u7ecf\u8fbe\u5230 9.4 \u4e07\u4e86\uff0c\u4f46 ReadMe \u6587\u6863\u6e05\u695a\u5730\u5199\u7740\u5b83\u6700\u597d\u7528\u4e8e macOS \u6216 Linux\u3002\u800c\u65b0\u53d1\u5e03\u7684 MS Terminal \u4e0d\u8bba\u5728\u754c\u9762\u8fd8\u662f\u5728\u6587\u5b57\u98ce\u683c\uff0c\u90fd\u4ee5\u524d\u90fd\u5f3a\u4e86\u5f88\u591a\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u80cc\u666f\u900f\u660e\u5ea6\u3001\u6587\u5b57\u9ad8\u4eae\u90fd\u53ef\u4ee5\u81ea\u884c\u5b9a\u4e49\uff0c\u8fd8\u80fd\u5b9a\u4e49 emoji \u7b49\u7b26\u53f7\u3002\u5982\u4e0b\u4e3a\u57fa\u672c\u7684\u5c55\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u8c03\u6574\u6574\u4e2a\u754c\u9762\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812745-1.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6574\u4e2a\u9879\u76ee\u8fd8\u5728\u79ef\u6781\u5f00\u53d1\u4e2d\uff0c\u5f88\u591a\u529f\u80fd\u4e5f\u90fd\u5728\u5b8c\u5584\u4e0e\u589e\u52a0\u3002\u4e0d\u8fc7\u65e2\u7136\u662f\u5fae\u8f6f\u5b98\u65b9\u7ef4\u62a4\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u90a3\u4e48\u6211\u4eec\u8fd8\u662f\u975e\u5e38\u6709\u4fe1\u5fc3\u7684\uff0c\u81f3\u5c11\u5728\u547d\u4ee4\u884c\u90e8\u5206\u53ef\u4ee5\u964d\u4f4e\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u62a5\u9519\u3002\u5f53\u7136\u5982\u679c\u8bfb\u8005\u5728 Windows \u4e0a\u6709\u66f4\u597d\u7684\u547d\u4ee4\u884c\u5de5\u5177\u63a8\u8350\uff0c\u4e5f\u53ef\u4ee5\u5728\u6587\u672b\u7559\u8a00\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u5b89\u88c5\u548c\u914d\u7f6e VS Code<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u524d\u9762\u4ecb\u7ecd\u4e86\u5f00\u53d1\u4e2d\u5fc5\u4e0d\u53ef\u7f3a\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u4e0b\u9762\u6211\u4eec\u8be5\u804a\u4e00\u804a VS Code \u4e86\uff0c\u5b83\u662f\u652f\u6301 Python \u5f00\u53d1\u7684\u6838\u5fc3\u5de5\u5177\u3002\u4e0b\u9762\u6211\u4eec\u4ece\u6700\u521d\u7684\u5b89\u88c5\u3001\u73af\u5883\u7ba1\u7406\u5230\u7f16\u5199\u3001\u6d4b\u8bd5\u3001\u53d1\u5e03\u4ee3\u7801\uff0c\u4ecb\u7ecd\u6211\u4eec\u8be5\u5982\u4f55\u4f18\u96c5\u5730\u4f7f\u7528 VS Code\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728\u4efb\u4f55\u5e73\u53f0\u4e0a\u90fd\u53ef\u4ee5\u5b89\u88c5 Visual Studio Code\u3002\u5b98\u7f51\u63d0\u4f9b\u4e86 Windows\u3001Mac \u548c Linux \u7684\u5b8c\u6574\u5b89\u88c5\u8bf4\u660e\uff0c\u5e76\u4e14\u4f1a\u6bcf\u6708\u66f4\u65b0\u7f16\u8f91\u5668\uff0c\u5176\u4e2d\u5305\u542b\u65b0\u529f\u80fd\u548c\u9519\u8bef\u4fee\u6b63\u3002\u4f60\u53ef\u4ee5\u5728 Visual Studio Code \u7f51\u7ad9\u4e0a\u627e\u5230\u6240\u6709\u5b89\u88c5\u5185\u5bb9\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/0-1632812745.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6b64\u5916\uff0c\u9664\u540d\u79f0\u76f8\u8fd1\u5916\uff0cVisual Studio Code\uff08\u7b80\u79f0 VS Code\uff09\u4e0e\u57fa\u4e8e Windows \u7684\u66f4\u5927\u89c4\u6a21\u7684 Visual Studio \u51e0\u4e4e\u6ca1\u6709\u5176\u4ed6\u76f8\u540c\u7684\u5730\u65b9\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">Visual Studio Code \u672c\u8eab\u652f\u6301\u591a\u79cd\u8bed\u8a00\uff0c\u5e76\u4e14\u5b83\u7684\u4e00\u4e2a\u6269\u5c55\u6a21\u578b\u5177\u6709\u652f\u6301\u5176\u4ed6\u7ec4\u4ef6\u7684\u4e30\u5bcc\u751f\u6001\u7cfb\u7edf\u3002VS Code \u6bcf\u6708\u66f4\u65b0\uff0c\u4f60\u53ef\u4ee5\u5728\u5fae\u8f6f Python \u535a\u5ba2\u4e2d\u4e86\u89e3\u66f4\u65b0\u4fe1\u606f\u3002\u4efb\u4f55\u7528\u6237\u90fd\u53ef\u4ee5\u514b\u9686\u5fae\u8f6f\u7684 VS Code Github \u4ed3\u5e93\u5e76\u8d21\u732e\u81ea\u5df1\u7684\u4ee3\u7801\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">VS Code UI \u5df2\u6709\u8be6\u7ec6\u8bb0\u5f55\uff0c\u8fd9\u91cc\u4e0d\u4e88\u8d58\u8ff0\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/5-1632812745-1.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><strong><span style=\"font-size: 15px;\">Python \u6269\u5c55<\/span><\/strong><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5982\u4e0a\u6240\u8ff0\uff0cVS Code \u901a\u8fc7\u8be6\u7ec6\u8bb0\u5f55\u7684\u6269\u5c55\u6a21\u578b\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u5f00\u53d1\u3002Python \u6269\u5c55\u4f7f\u7528\u6237\u53ef\u4ee5\u5728 Visual Studio Code \u4e2d\u8fdb\u884c Python \u5f00\u53d1\uff0c\u5177\u6709\u4ee5\u4e0b\u7279\u5f81\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u65e2\u652f\u6301 Python 3.4 \u53ca\u66f4\u9ad8\u7248\u672c\uff0c\u4e5f\u652f\u6301 Python 2.7 \u7248\u672c<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4f7f\u7528 IntelliSense \u5b8c\u6210\u4ee3\u7801\u8865\u5168<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">Linting<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u8c03\u8bd5\u652f\u6301<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4ee3\u7801\u7247\u6bb5\u652f\u6301<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5355\u5143\u6d4b\u8bd5\u652f\u6301<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u81ea\u52a8\u4f7f\u7528 conda \u548c\u865a\u62df\u73af\u5883<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5728 Jupyter \u73af\u5883\u548c Jupyter \u7b14\u8bb0\u672c\u4e2d\u8fdb\u884c\u4ee3\u7801\u7f16\u8f91<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px; font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/6-1632812745.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">Visual Studio Code \u6269\u5c55\u4e0d\u4ec5\u4ec5\u5177\u6709\u7f16\u7a0b\u529f\u80fd\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">Keymaps \u5141\u8bb8\u5df2\u7ecf\u719f\u6089 Atom\uff0cSublime Text\uff0cEmacs\uff0cVim\uff0cPyCharm \u6216\u5176\u4ed6\u73af\u5883\u7684\u7528\u6237\u66f4\u52a0\u5bb9\u6613\u4e0a\u624b\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4e3b\u9898\u81ea\u5b9a\u4e49 UI\uff0c\u65e0\u8bba\u60a8\u559c\u6b22\u5728\u660e\u4eae\uff0c\u9ed1\u6697\u6216\u66f4\u4e30\u5bcc\u591a\u5f69\u7684\u5730\u65b9\u8fdb\u884c\u7f16\u7801\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u8bed\u8a00\u5305\u63d0\u4f9b\u672c\u5730\u5316\u4f53\u9a8c\u3002<\/span><\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4ee5\u4e0b\u662f\u6bd4\u8f83\u6709\u7528\u7684\u4e00\u4e9b\u5176\u4ed6\u6269\u5c55\u548c\u8bbe\u7f6e\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">GitLens \u76f4\u63a5\u5728\u7f16\u8f91\u89c6\u7a97\u4e2d\u63d0\u4f9b\u4e86\u5927\u91cf\u6709\u7528\u7684 Git \u529f\u80fd\uff0c\u5305\u62ec\u975e\u8d23\u4efb\u6ce8\u91ca\u548c\u5b58\u50a8\u5e93\u5f00\u53d1\u529f\u80fd\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u901a\u8fc7\u4ece\u83dc\u5355\u4e2d\u9009\u62e9 File, Auto Save\uff0c\u53ef\u4ee5\u8f7b\u677e\u8fdb\u884c\u81ea\u52a8\u4fdd\u5b58\u3002\u9ed8\u8ba4\u5ef6\u8fdf\u65f6\u95f4\u4e3a 1000 \u6beb\u79d2\uff0c\u4e5f\u53ef\u4ee5\u91cd\u65b0\u914d\u7f6e\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">Settings Sync \u5141\u8bb8\u7528\u6237\u501f\u52a9 GitHub \u5728\u4e0d\u540c\u7684\u88c5\u7f6e\u4e2d\u540c\u6b65\u81ea\u5df1\u7684 VS Code \u8bbe\u7f6e\u3002\u5982\u679c\u7528\u6237\u5728\u4e0d\u540c\u7684\u8ba1\u7b97\u673a\u4e0a\u5de5\u4f5c\uff0c\u8fd9\u6709\u52a9\u4e8e\u8fd0\u884c\u73af\u5883\u4fdd\u6301\u4e00\u81f4\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">Docker \u8ba9\u7528\u6237\u53ef\u4ee5\u5feb\u901f\u8f7b\u677e\u5730\u4f7f\u7528 Docker\uff0c\u5e2e\u52a9\u521b\u4f5c Dockerfile \u548c docker-compose.yml\uff0c\u6253\u5305\u548c\u90e8\u7f72\u9879\u76ee\uff0c\u751a\u81f3\u4e3a\u9879\u76ee\u751f\u6210\u9002\u5f53\u7684 Docker \u6587\u4ef6\u3002<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5f53\u7136\uff0c\u5728\u4f7f\u7528 VS Code \u65f6\uff0c\u4f60\u53ef\u80fd\u4f1a\u53d1\u73b0\u5176\u4ed6\u6709\u7528\u7684\u6269\u5c55\u3002\u8bf7\u5728\u8bc4\u8bba\u4e2d\u5206\u4eab\u4f60\u7684\u53d1\u73b0\u548c\u8bbe\u7f6e\uff01<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5355\u51fb\u6d3b\u52a8\u680f\uff08Activity Bar\uff09\u4e0a\u7684\u300c\u6269\u5c55\u300d\u56fe\u6807\u53ef\u4ee5\u8bbf\u95ee\u548c\u5b89\u88c5\u65b0\u6269\u5c55\u548c\u4e3b\u9898\u3002\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u5173\u952e\u8bcd\u6765\u641c\u7d22\u6269\u5c55\u7a0b\u5e8f\uff0c\u4ee5\u591a\u79cd\u65b9\u5f0f\u5bf9\u641c\u7d22\u7ed3\u679c\u8fdb\u884c\u6392\u5e8f\uff0c\u5feb\u901f\u8f7b\u677e\u5730\u5b89\u88c5\u6269\u5c55\u7a0b\u5e8f\u3002\u5728\u672c\u6587\u4e2d\uff0c\u5728\u6d3b\u52a8\u680f\u7684 Extensions \u9879\u4e2d\u952e\u5165 python \u5e76\u5355\u51fb Install \u5373\u53ef\u5b89\u88c5 Python \u6269\u5c55\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/0-1632812746.gif\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u76f8\u540c\u7684\u65b9\u5f0f\u67e5\u627e\u548c\u5b89\u88c5\u4e0a\u8ff0\u4efb\u4f55\u6269\u5c55\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><strong><span style=\"font-size: 15px;\">Visual Studio Code \u914d\u7f6e\u6587\u4ef6<\/span><\/strong><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0cVisual Studio Code \u53ef\u901a\u8fc7\u7528\u6237\u548c\u5de5\u4f5c\u533a\u8bbe\u7f6e\uff08User and Workspace Settings\uff09\u5b9e\u73b0\u9ad8\u5ea6\u914d\u7f6e\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u7528\u6237\u8bbe\u7f6e\uff08User settings\uff09\u5728\u6240\u6709 Visual Studio Code \u5b9e\u4f8b\u4e2d\u90fd\u662f\u5168\u5c40\u6027\u7684\uff0c\u800c\u5de5\u4f5c\u533a\u8bbe\u7f6e\uff08Workspace Settings\uff09\u662f\u7279\u5b9a\u6587\u4ef6\u5939\u6216\u9879\u76ee\u5de5\u4f5c\u533a\u7684\u672c\u5730\u8bbe\u7f6e\u3002\u5de5\u4f5c\u533a\u8bbe\u7f6e\u4e3a VS Code \u63d0\u4f9b\u4e86\u6781\u5927\u7684\u7075\u6d3b\u6027\uff0c\u5de5\u4f5c\u533a\u8bbe\u7f6e\u4f1a\u5728\u6574\u7bc7\u6587\u7ae0\u4e2d\u63d0\u5230\u3002\u5de5\u4f5c\u533a\u8bbe\u7f6e\u4ee5.json \u6587\u4ef6\u7684\u5f62\u5f0f\u5b58\u50a8\u5728\u540d\u4e3a.vscode \u7684\u9879\u76ee\u5de5\u4f5c\u533a\u672c\u5730\u6587\u4ef6\u5939\u4e2d\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u542f\u52a8\u65b0\u7684 Python \u7a0b\u5e8f<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u8ba9\u6211\u4eec\u4ee5\u4e00\u4e2a\u65b0\u7684 Python \u7a0b\u5e8f\u6765\u63a2\u7d22 Visual Studio Code \u4e2d\u7684 Python \u5f00\u53d1\u3002\u5728 VS Code \u4e2d\uff0c\u952e\u5165 Ctrl + N \u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\uff08\u4f60\u4e5f\u53ef\u4ee5\u4ece\u83dc\u5355\u4e2d\u9009\u62e9\u300c\u6587\u4ef6\u300d-\u300c\u65b0\u5efa\u300d\u3002\uff09<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u65e0\u8bba\u4f60\u5982\u4f55\u64cd\u4f5c\uff0c\u4f60\u90fd\u5e94\u8be5\u770b\u5230\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\u4ee5\u4e0b\u5185\u5bb9\u7684 VS Code \u7a97\u53e3\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/1-1632812746.png\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6253\u5f00\u65b0\u6587\u4ef6\u540e\uff0c\u4f60\u5373\u53ef\u4ee5\u8f93\u5165\u4ee3\u7801\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><strong><span style=\"font-size: 15px;\">\u8f93\u5165 Python \u4ee3\u7801<\/span><\/strong><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f5c\u4e3a\u6d4b\u8bd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u7f16\u7801\u57c3\u62c9\u6258\u65af\u7279\u5c3c\u7b5b\u6cd5\uff08Sieve of Eratosthenes\uff0c\u5b83\u53ef\u4ee5\u627e\u51fa\u5c0f\u4e8e\u5df2\u77e5\u6570\u7684\u6240\u6709\u8d28\u6570\uff09\u3002\u5728\u521a\u6253\u5f00\u7684\u65b0\u9009\u9879\u5361\u4e2d\u952e\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/9-1632812746.png\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u7b49\u7b49\uff0c\u8fd9\u662f\u600e\u4e48\u56de\u4e8b\uff1f\u4e3a\u4ec0\u4e48 Visual Studio Code \u6ca1\u6709\u8fdb\u884c\u4efb\u4f55\u5173\u952e\u8bcd\u9ad8\u4eae\u663e\u793a\uff0c\u4e5f\u6ca1\u6709\u8fdb\u884c\u4efb\u4f55\u81ea\u52a8\u683c\u5f0f\u5316\u6216\u4efb\u4f55\u771f\u6b63\u6709\u7528\u7684\u64cd\u4f5c\u5462\uff1f\u5b83\u63d0\u4f9b\u4e86\u4ec0\u4e48\uff1f<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u7b54\u6848\u662f\uff0cVS Code \u4e0d\u77e5\u9053\u5b83\u6b63\u5728\u5904\u7406\u7684\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u6587\u4ef6\u3002\u7f13\u51b2\u533a\u88ab\u79f0\u4e3a Untitled-1\uff0c\u5982\u679c\u4f60\u67e5\u770b\u7a97\u53e3\u7684\u53f3\u4e0b\u89d2\uff0c\u5219\u53ef\u4ee5\u770b\u5230 Plain Text\uff08\u7eaf\u6587\u672c\uff09\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u82e5\u8981\u6fc0\u6d3b Python \u6269\u5c55\uff0c\u8bf7\u4fdd\u5b58\u6587\u4ef6\uff08\u4ece\u83dc\u5355\u4e2d\u9009\u62e9 File-Save \u6216\u8005\u4ece\u547d\u4ee4\u9762\u677f\u4e2d\u9009\u62e9 File-Save File \u6216\u8005\u53ea\u4f7f\u7528 Ctrl + S\uff09\u4e3a sieve.py\u3002VS Code \u5c06\u770b\u5230.py \u6269\u5c55\u540d\u5e76\u6b63\u786e\u5730\u5c06\u8be5\u6587\u4ef6\u8f6c\u5316\u4e3a Python \u4ee3\u7801\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u73b0\u5728\u4f60\u7684\u7a97\u53e3\u89c6\u56fe\u5e94\u5982\u4e0b\u6240\u793a\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/9-1632812746-1.png\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u8fd9\u6837\u5c31\u597d\u591a\u4e86\uff01VS Code \u4f1a\u81ea\u52a8\u5c06\u6587\u4ef6\u91cd\u65b0\u683c\u5f0f\u5316\u4e3a Python \u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u5de6\u4e0b\u89d2\u7684\u8bed\u8a00\u6a21\u5f0f\u4e88\u4ee5\u9a8c\u8bc1\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5982\u679c\u4f60\u6709\u591a\u4e2a Python \u5b89\u88c5\uff08\u5982 Python 2.7\u3001Python 3.x \u6216 Anaconda\uff09\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u5355\u51fb\u8bed\u8a00\u6a21\u5f0f\u6307\u793a\u5668\u6216\u8005\u4ece\u547d\u4ee4\u9762\u677f\u4e2d\u9009\u62e9 Python: Select Interpreter \u6765\u66f4\u6539 VS Code \u6240\u8981\u4f7f\u7528\u7684 Python \u89e3\u91ca\u5668\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cVS Code \u652f\u6301\u4f7f\u7528 pep8 \u683c\u5f0f\uff0c\u4f46\u4f60\u4e5f\u53ef\u4ee5\u9009\u62e9 black \u6216 yapf\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/5-1632812746.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u73b0\u5728\u53ef\u4ee5\u6dfb\u52a0\u5176\u4f59\u7684 Sieve \u4ee3\u7801\u3002\u82e5\u8981\u67e5\u770b IntelliSense\uff0c\u8bf7\u76f4\u63a5\u952e\u5165\u6b64\u4ee3\u7801\u800c\u4e0d\u8981\u526a\u5207\u548c\u7c98\u8d34\uff0c\u4f60\u5e94\u8be5\u770b\u5230\u5982\u4e0b\u5185\u5bb9\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812746.gif\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5f53\u952e\u5165\u4ee3\u7801\u65f6\uff0cVS Code \u4f1a\u5bf9 for \u548c if \u8bed\u53e5\u4e0b\u9762\u7684\u884c\u8fdb\u884c\u81ea\u52a8\u3001\u9002\u5f53\u7684\u7f29\u8fdb\uff0c\u6dfb\u52a0\u53f3\u62ec\u53f7\uff0c\u5e76\u7ed9\u51fa\u5185\u5bb9\u63d0\u793a\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><strong><span style=\"font-size: 15px;\">\u8fd0\u884c Python \u4ee3\u7801<\/span><\/strong><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u73b0\u5728\u4ee3\u7801\u5df2\u7ecf\u5b8c\u6210\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u5b83\u4e86\u3002\u6ca1\u6709\u5fc5\u8981\u8ba9\u7f16\u8f91\u5668\u6267\u884c\u6b64\u64cd\u4f5c\uff1aVisual Studio Code \u53ef\u4ee5\u76f4\u63a5\u5728\u7f16\u8f91\u5668\u4e2d\u8fd0\u884c\u6b64\u7a0b\u5e8f\u3002\u4fdd\u5b58\u6587\u4ef6\uff08Ctrl + S\uff09\uff0c\u7136\u540e\u5728\u7f16\u8f91\u5668\u7a97\u53e3\u4e2d\u5355\u51fb\u53f3\u952e\u5e76\u9009\u62e9\u5728\u7ec8\u7aef\uff08Terminal\uff09\u4e2d\u8fd0\u884c Python \u6587\u4ef6\uff08Run Python File\uff09\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812747.gif\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f60\u4f1a\u770b\u5230\u7ec8\u7aef\u7a97\u683c\u663e\u793a\u5728\u7a97\u53e3\u7684\u5e95\u90e8\uff0c\u5e76\u663e\u793a\u4ee3\u7801\u8f93\u51fa\u7ed3\u679c\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u7f16\u8f91\u73b0\u6709\u7684 Python \u9879\u76ee<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728 Sieve of Eratosthenes \u793a\u4f8b\u4e2d\uff0c\u4f60\u521b\u5efa\u4e86\u4e00\u4e2a Python \u6587\u4ef6\u3002\u4f5c\u4e3a\u4e00\u4e2a\u4f8b\u5b50\u8fd9\u5f88\u4e0d\u9519\uff0c\u4f46\u5f88\u591a\u65f6\u5019\uff0c\u4f60\u9700\u8981\u521b\u5efa\u66f4\u5927\u7684\u9879\u76ee\uff0c\u5e76\u5728\u66f4\u957f\u7684\u65f6\u95f4\u5185\u5728\u5b83\u4e0a\u9762\u8fdb\u884c\u5f00\u53d1\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5178\u578b\u7684\u65b0\u9879\u76ee\u5de5\u4f5c\u6d41\u7a0b\u53ef\u80fd\u5982\u4e0b\u6240\u793a\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u6765\u4fdd\u5b58\u9879\u76ee\uff08\u53ef\u80fd\u5305\u542b\u4e00\u4e2a\u65b0\u7684 GitHub \u9879\u76ee\uff09<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u66f4\u6539\u4e3a\u65b0\u6587\u4ef6\u5939<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u4f7f\u7528\u547d\u4ee4 code filename.py \u521b\u5efa\u521d\u59cb Python \u4ee3\u7801<\/span><\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728 Python \u9879\u76ee\uff08\u800c\u4e0d\u662f\u5355\u4e2a Python \u6587\u4ef6\uff09\u4e0a\u4f7f\u7528 Visual Studio Code \u5f00\u8f9f\u4e86\u66f4\u591a\u529f\u80fd\uff0c\u4f7f\u5f97 VS Code \u80fd\u591f\u771f\u6b63\u53d1\u6325\u4f5c\u7528\u3002\u8ba9\u6211\u4eec\u6765\u770b\u770b\u5b83\u5728\u66f4\u5927\u7684\u9879\u76ee\u4e2d\u5982\u4f55\u8fd0\u4f5c\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5047\u5982\u6211\u4eec\u7f16\u5199\u4e86\u4e00\u4e2a\u8ba1\u7b97\u5668\u7a0b\u5e8f\uff0c\u8be5\u7a0b\u5e8f\u901a\u8fc7\u827e\u5179\u683c\u00b7\u8fea\u79d1\u65af\u5f7b\uff08Edsger Dijkstra\uff09\u8c03\u5ea6\u573a\u7b97\u6cd5\u7684\u4e00\u79cd\u53d8\u4f53\u6765\u89e3\u6790\u4e2d\u7f00\u7b26\u53f7\uff08infix notation\uff09\u7f16\u5199\u7684\u65b9\u7a0b\u5f0f\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4e3a\u4e86\u8bf4\u660e Visual Studio Code \u4ee5\u9879\u76ee\u4e3a\u4e2d\u5fc3\u7684\u7279\u5f81\uff0c\u6211\u4eec\u73b0\u5728\u5f00\u59cb\u5728 Python \u4e2d\u91cd\u65b0\u521b\u5efa\u8c03\u5ea6\u573a\u7b97\u6cd5\u4f5c\u4e3a\u65b9\u7a0b\u5f0f\u8bc4\u4f30\u5e93\u3002\u76f8\u5e94 GitHub \u5730\u5740\uff1ahttps:\/\/github.com\/JFincher42\/PyEval\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u672c\u5730\u6587\u4ef6\u5939\u521b\u5efa\u540e\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u6253\u5f00 VS Code \u4e2d\u7684\u6574\u4e2a\u6587\u4ef6\u5939\u3002\u7531\u4e8e\u6211\u4eec\u5df2\u7ecf\u521b\u5efa\u4e86\u6587\u4ef6\u5939\u548c\u57fa\u672c\u6587\u4ef6\uff0c\u6240\u4ee5\u9996\u9009\u65b9\u6cd5\uff08\u5982\u4e0a\u6240\u8ff0\uff09\u505a\u51fa\u5982\u4e0b\u4fee\u6b63\uff1a<\/span><\/section>\n<blockquote class=\"js_blockquote_wrap\">\n<section class=\"js_blockquote_digest\">\n<section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">cd \/path\/to\/project<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">code .<\/span><\/section>\n<\/section>\n<\/section>\n<\/blockquote>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5f53\u4f60\u8fd9\u79cd\u65b9\u5f0f\u6253\u5f00\u65f6\uff0cVS Code \u4e86\u89e3\u5e76\u5c06\u4f7f\u7528\u5b83\u770b\u5230\u7684\u4efb\u4f55 virtualenv\u3001pipenv \u6216 conda \u73af\u5883\u3002\u4f60\u751a\u81f3\u4e0d\u9700\u8981\u9996\u5148\u542f\u52a8\u865a\u62df\u73af\u5883\u3002\u901a\u8fc7\u83dc\u5355\u4e2d\u7684 File, Open Folder\u3001\u952e\u76d8\u4e0a\u7684 Ctrl+K, Ctrl+O \u6216\u8005\u547d\u4ee4\u9762\u677f\u4e2d\u7684 File, Open Folder \u7b49\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u7528\u6237\u754c\u9762\uff08UI\uff09\u4e0a\u7684\u6587\u4ef6\u5939\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4ee5\u4e0b\u662f\u521b\u5efa\u7684\u65b9\u7a0b\u5f0f eval \u5e93\u9879\u76ee\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" style=\"width: 100%; height: auto;\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/4-1632812747.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5f53 Visual Studio Code \u6253\u5f00\u6587\u4ef6\u5939\u65f6\uff0c\u5b83\u8fd8\u4f1a\u518d\u6b21\u6253\u5f00\u4e0a\u6b21\u6253\u5f00\u7684\u6587\u4ef6\uff08\u8fd9\u662f\u53ef\u914d\u7f6e\u7684\uff09\u3002\u4f60\u53ef\u4ee5\u6253\u5f00\u3001\u7f16\u8f91\u3001\u8fd0\u884c\u548c\u8c03\u8bd5\u5217\u51fa\u7684\u4efb\u4f55\u6587\u4ef6\u3002\u5de6\u4fa7\u6d3b\u52a8\u680f\u4e2d\u7684\u8d44\u6e90\u7ba1\u7406\u5668\u89c6\u56fe\uff08Explorer view\uff09\u63d0\u4f9b\u6587\u4ef6\u5939\u4e2d\u6240\u6709\u6587\u4ef6\u7684\u89c6\u56fe\uff0c\u5e76\u663e\u793a\u5f53\u524d\u9009\u9879\u5361\u96c6\u4e2d\u6709\u591a\u5c11\u672a\u4fdd\u5b58\u6587\u4ef6\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u4ee3\u7801\u6d4b\u8bd5\u7684\u652f\u6301<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">VS Code \u53ef\u4ee5\u81ea\u52a8\u8bc6\u522b\u5728 unittest\u3001pytest \u6216 Nose \u6846\u67b6\u4e2d\u7f16\u5199\u7684\u73b0\u6709 Python \u6d4b\u8bd5\uff0c\u4f46\u524d\u63d0\u662f\u5728\u5f53\u524d\u73af\u5883\u4e2d\u5b89\u88c5\u4e86\u8fd9\u4e9b\u6846\u67b6\u3002\u4f5c\u8005\u5728 unittest \u6846\u67b6\u4e2d\u7f16\u5199\u4e86\u4e00\u4e2a\u7528\u4e8e\u65b9\u7a0b\u5f0f eval \u5e93\u7684\u5355\u5143\u6d4b\u8bd5\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u4f7f\u7528\u5b83\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u82e5\u8981\u8fd0\u884c\u9879\u76ee\u4e2d\u4efb\u4f55 Python \u6587\u4ef6\u7684\u73b0\u6709\u5355\u5143\u6d4b\u8bd5\uff0c\u8bf7\u5355\u51fb\u53f3\u952e\u5e76\u9009\u62e9 Run Current Unit Test File\u3002\u7cfb\u7edf\u5c06\u63d0\u793a\u6307\u5b9a\u6d4b\u8bd5\u6846\u67b6\uff0c\u5728\u9879\u76ee\u4e2d\u641c\u7d22\u6d4b\u8bd5\u7684\u4f4d\u7f6e\u4ee5\u53ca\u6d4b\u8bd5\u4f7f\u7528\u7684\u6587\u4ef6\u540d\u6a21\u5f0f\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6240\u6709\u8fd9\u4e9b\u90fd\u4fdd\u5b58\u4e3a\u672c\u5730.vscode\/settings.json \u6587\u4ef6\u4e2d\u7684\u5de5\u4f5c\u533a\u8bbe\u7f6e\uff0c\u5e76\u53ef\u4ee5\u8fdb\u884c\u4fee\u6539\u3002\u5bf9\u4e8e\u8fd9\u4e2a\u7b49\u5f0f\u9879\u76ee\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9 unittest\u3001\u5f53\u524d\u6587\u4ef6\u5939\u548c\u6a21\u5f0f *_test.py\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6d4b\u8bd5\u6846\u67b6\u8bbe\u7f6e\u5b8c\u6210\u5e76\u663e\u793a\u6d4b\u8bd5\u540e\uff0c\u4f60\u53ef\u4ee5\u5355\u51fb\u72b6\u6001\u680f\uff08Status Bar\uff09\u4e0a\u7684 Run Tests \u5e76\u4ece\u547d\u4ee4\u9762\u677f\u4e2d\u9009\u62e9\u4e00\u4e2a option \u6765\u8fd0\u884c\u6240\u6709\u6d4b\u8bd5\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/7-1632812747.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u901a\u8fc7\u5728 VS Code \u4e2d\u6253\u5f00\u6d4b\u8bd5\u6587\u4ef6\uff0c\u5355\u51fb\u72b6\u6001\u680f\u4e0a\u7684 Run Tests\uff0c\u7136\u540e\u9009\u62e9 Run Unit Test Method \u4ee5\u53ca\u5176\u4ed6\u8981\u8fd0\u884c\u7684\u7279\u5b9a\u6d4b\u8bd5\uff0c\u4f60\u8fd8\u53ef\u4ee5\u8fd0\u884c\u5355\u4e2a\u6d4b\u8bd5\u3002\u8fd9\u4f7f\u5f97\u89e3\u51b3\u5355\u4e2a\u6d4b\u8bd5\u5931\u8d25\u5e76\u91cd\u65b0\u8fd0\u884c\u5931\u8d25\u7684\u6d4b\u8bd5\u53d8\u5f97\u5f88\u7b80\u5355\uff0c\u4ece\u800c\u80fd\u591f\u8282\u7701\u5927\u91cf\u65f6\u95f4\u3002\u6d4b\u8bd5\u7ed3\u679c\u663e\u793a\u5728 Python Test Log \u4e0b\u7684 Output \u7a97\u683c\u4e2d\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-size: 16px;\">\u8c03\u8bd5\u652f\u6301<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5373\u4f7f VS Code \u662f\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u76f4\u63a5\u5728 VS Code \u4e2d\u8c03\u8bd5 Python \u4e5f\u662f\u53ef\u4ee5\u7684\u3002VS Code \u63d0\u4f9b\u7684\u8bf8\u591a\u529f\u80fd\u53ef\u4ee5\u5ab2\u7f8e\u597d\u7684\u4ee3\u7801\u8c03\u8bd5\u5668\uff0c\u5305\u62ec\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u81ea\u52a8\u53d8\u91cf\u8ddf\u8e2a<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u76d1\u770b\u8868\u8fbe\u5f0f<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u65ad\u70b9<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u8c03\u7528\u5806\u6808\u68c0\u67e5<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f60\u53ef\u4ee5\u5728\u6d3b\u52a8\u680f\u4e0a\u7684 Debug \u89c6\u56fe\u4e2d\u770b\u5230\u8fd9\u4e9b\u529f\u80fd\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812748.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u8c03\u8bd5\u5668\u53ef\u4ee5\u63a7\u5236\u5728\u5185\u7f6e\u7ec8\u7aef\u6216\u5916\u90e8\u7ec8\u7aef\u5b9e\u4f8b\u4e2d\u8fd0\u884c\u7684 Python \u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u9644\u52a0\u5230\u5df2\u7ecf\u8fd0\u884c\u7684 Python \u5b9e\u4f8b\u4e2d\uff0c\u751a\u81f3\u53ef\u4ee5\u8c03\u8bd5 Django \u548c Flask \u5e94\u7528\u7a0b\u5e8f\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728\u5355\u4e2a Python \u6587\u4ef6\u4e2d\u8c03\u8bd5\u4ee3\u7801\u5c31\u50cf\u6309 F5 \u542f\u52a8\u8c03\u8bd5\u5668\u4e00\u6837\u7b80\u5355\u3002\u4f60\u53ef\u4ee5\u6309 F10 \u548c F11 \u5206\u522b\u8df3\u8fc7\u548c\u8fdb\u5165\u51fd\u6570\uff0c\u5e76\u6309 Shift + F5 \u9000\u51fa\u8c03\u8bd5\u5668\u3002\u6309 F9 \u8bbe\u7f6e\u65ad\u70b9\uff0c\u6216\u8005\u901a\u8fc7\u5355\u51fb\u7f16\u8f91\u5668\u7a97\u53e3\u4e2d\u7684\u5de6\u7a7a\u767d\uff08lift margin\uff09\u8fdb\u884c\u8bbe\u7f6e\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728\u5f00\u59cb\u8c03\u8bd5\u66f4\u590d\u6742\u7684\u9879\u76ee\uff08\u5305\u62ec Django \u6216 Flask \u5e94\u7528\u7a0b\u5e8f\uff09\u4e4b\u524d\uff0c\u4f60\u9996\u5148\u9700\u8981\u8bbe\u7f6e\u5e76\u9009\u62e9\u8c03\u8bd5\u914d\u7f6e\u3002\u8bbe\u7f6e\u8c03\u8bd5\u914d\u7f6e\u76f8\u5bf9\u7b80\u5355\u3002\u4ece Debug \u89c6\u56fe\u4e2d\u9009\u62e9 Configuration \u4e0b\u62c9\u5217\u8868\uff08drop-down\uff09\uff0c\u7136\u540e\u9009\u62e9 Add Configuration \u548c Python\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/1-1632812748.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">Visual Studio Code \u5c06\u5728\u5f53\u524d\u540d\u4e3a.vscode\/launch.json \u7684\u6587\u4ef6\u5939\u4e0b\u521b\u5efa\u4e00\u4e2a\u8c03\u8bd5\u914d\u7f6e\u6587\u4ef6\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u8bbe\u7f6e\u7279\u5b9a\u7684 Python \u914d\u7f6e\u4ee5\u53ca\u8c03\u8bd5 Django \u548c Flask \u7b49\u7279\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u8bbe\u7f6e\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f60\u8fd8\u53ef\u4ee5\u6267\u884c\u8fdc\u7a0b\u8c03\u8bd5\uff0c\u5e76\u8c03\u8bd5 Jinja \u548c Django \u6a21\u677f\u3002\u5173\u95ed\u7f16\u8f91\u5668\u4e2d\u7684 launch.json \u6587\u4ef6\uff0c\u7136\u540e\u4ece Configuration \u4e0b\u62c9\u5217\u8868\u4e2d\u4e3a\u5e94\u7528\u7a0b\u5e8f\u9009\u62e9\u6b63\u786e\u7684\u914d\u7f6e\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #7b0c00;\"><strong><span style=\"color: #7b0c00; font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 16px;\">Git \u96c6\u6210<\/span><\/strong><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">VS Code \u4e0d\u4ec5\u5185\u7f6e\u5bf9\u6e90\u4ee3\u7801\u63a7\u5236\u7ba1\u7406\u7684\u652f\u6301\uff0c\u8fd8\u652f\u6301 Git \u548c GitHub\u3002\u4f60\u53ef\u4ee5\u5728 VS Code \u4e2d\u5b89\u88c5\u5bf9\u5176\u4ed6 SCM \u7684\u652f\u6301\uff0c\u5e76\u5217\u4f7f\u7528\u5b83\u4eec\u3002\u7528\u6237\u53ef\u4ee5\u4ece Source Control \u89c6\u56fe\u8bbf\u95ee\u6e90\u4ee3\u7801\u63a7\u5236\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/10-1632812750.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5982\u679c\u4f60\u7684\u9879\u76ee\u6587\u4ef6\u5939\u5305\u542b.git \u6587\u4ef6\u5939\uff0cVS Code \u4f1a\u81ea\u52a8\u6253\u5f00\u6240\u6709 Git \/ GitHub \u529f\u80fd\u3002\u4f60\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u8bf8\u591a\u4efb\u52a1\uff1a<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5c06\u6587\u4ef6\u63d0\u4ea4\u7ed9 Git<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93\uff08remote repo\uff09\u5e76\u4ece\u4e2d\u53d6\u51fa\u66f4\u6539<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">check-out \u73b0\u6709\u6216\u521b\u5efa\u65b0\u7684\u5206\u652f\u548c\u6807\u7b7e\uff08branch and tag\uff09<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u5e76\u89e3\u51b3\u5408\u5e76\u51b2\u7a81\uff08merge conflict\uff09<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u5dee\u5f02\uff08view diffs\uff09<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6240\u6709\u8fd9\u4e9b\u529f\u80fd\u90fd\u53ef\u4ee5\u76f4\u63a5\u4ece VS Code UI \u83b7\u5f97\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/0-1632812750.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">VS Code \u8fd8\u53ef\u4ee5\u8bc6\u522b\u7f16\u8f91\u5668\u5916\u90e8\u8fdb\u884c\u7684\u66f4\u6539\u5e76\u4e14\u6b63\u786e\u8fd0\u4f5c\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u5728 VS Code \u4e2d\u63d0\u4ea4\u6700\u8fd1\u7684\u66f4\u6539\u76f8\u5f53\u7b80\u5355\u3002\u4fee\u6539\u540e\u7684\u6587\u4ef6\u663e\u793a\u5728 Source Control \u89c6\u56fe\u4e2d\uff0c\u5e76\u5e26\u6709 M \u6807\u8bb0\uff0c\u800c\u65b0\u7684\u672a\u8ddf\u8e2a\u6587\u4ef6\u4f7f\u7528 U \u6807\u8bb0\u3002\u5c06\u9f20\u6807\u60ac\u505c\u5728\u6587\u4ef6\u4e0a\u7136\u540e\u5355\u51fb\u52a0\u53f7\uff08+\uff09\u53ef\u4ee5\u6682\u5b58\u66f4\u6539\u3002\u5728\u89c6\u56fe\u9876\u90e8\u6dfb\u52a0\u63d0\u4ea4\u6d88\u606f\uff0c\u7136\u540e\u5355\u51fb\u590d\u9009\u6807\u8bb0\u6765\u63d0\u4ea4\u66f4\u6539\uff1a<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: center;\"><span style=\"font-size: 15px;\"><img decoding=\"async\" title=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2021\/09\/2-1632812750.jpeg\" alt=\"\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\" \/><\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u4f60\u4e5f\u53ef\u4ee5\u5728 VS Code \u4e2d\u5c06\u672c\u5730\u63d0\u4ea4\uff08local commits\uff09\u63a8\u9001\u5230 GitHub\u3002\u4ece Source Control \u89c6\u56fe\u83dc\u5355\u4e2d\u9009\u62e9 Sync\uff0c\u6216\u8005\u5355\u51fb\u5206\u652f\u6307\u793a\u5668\uff08branch indicator\uff09\u65c1\u8fb9\u72b6\u6001\u680f\u4e0a\u7684 Synchronize Changes\u3002<\/span><\/section>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u6240\u4ee5\u5728\u4f5c\u8005\u770b\u6765\uff0cVisual Studio Code \u662f\u6700\u9177\u7684\u901a\u7528\u7f16\u8f91\u5668\u4e4b\u4e00\uff0c\u4e5f\u662f Python \u5f00\u53d1\u7684\u6700\u4f73\u5019\u9009\u5de5\u5177\u3002\u5e0c\u671b\u4f60\u4e5f\u53ef\u4ee5\u5728 Python \u5f00\u53d1\u4e2d\u5c1d\u8bd5\u4f7f\u7528 Visual Studio Code \u7f16\u8f91\u5668\uff0c\u76f8\u4fe1\u4e0d\u4f1a\u4ee4\u4f60\u5931\u671b\u7684\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"line-height: 1.75em; text-align: left;\"><span style=\"color: #888888; font-size: 12px;\">\u53c2\u8003\u6587\u7ae0\uff1a<\/span><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-align: left;\"><span style=\"color: #888888; font-size: 12px;\">https:\/\/realpython.com\/python-development-visual-studio-code\/<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: left;\"><span style=\"color: #888888; font-size: 12px;\">https:\/\/devblogs.microsoft.com\/commandline\/introducing-windows-terminal\/<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.75em; text-align: left;\"><\/section>\n<figure style=\"outline: 0px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff; text-align: center;\"><span style=\"outline: 0px; text-align: justify;\">&#8212; EOF &#8212;<\/span><\/figure>\n<p style=\"outline: 0px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff;\">\u00a0<\/p>\n<\/div>\n\n\n<p>\u8f6c\u81ea\uff1ahttps:\/\/mp.weixin.qq.com\/s\/q-rz7moJYJVi_xwM_Eo5WQ<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9009\u81ea Real Python\uff0c\u4f5c\u8005\uff1aJon Fincher \u5728 Windows \u4e0a\u600e\u6837\u505a Python \u5f00\u53d1\uff1f &hellip; <a href=\"http:\/\/www.zhushiyao.com\/?p=89199\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u5728 Windows\u4e0a\u5199 Python \u4ee3\u7801\u7684\u6700\u4f73\u7ec4\u5408\uff01\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[8],"_links":{"self":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/89199"}],"collection":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89199"}],"version-history":[{"count":2,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/89199\/revisions"}],"predecessor-version":[{"id":89223,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/89199\/revisions\/89223"}],"wp:attachment":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}