{"id":673,"date":"2025-11-12T01:17:16","date_gmt":"2025-11-11T17:17:16","guid":{"rendered":"https:\/\/khsci.com\/khQuant\/?page_id=673"},"modified":"2025-11-12T22:27:40","modified_gmt":"2025-11-12T14:27:40","slug":"chapter2-3","status":"publish","type":"page","link":"https:\/\/khsci.com\/khQuant\/chapter2-3\/","title":{"rendered":"2.3 \u5185\u7f6e\u7f16\u8f91\u5668\u6a21\u5757"},"content":{"rendered":"<p>V3\u7248\u672c\u65b0\u589e\u7684<strong>\u5185\u7f6e\u4ee3\u7801\u7f16\u8f91\u5668<\/strong>\u662f\u5176\u8fc8\u5411\u4e00\u7ad9\u5f0f\u5f00\u53d1\u73af\u5883\u7684\u6700\u91cd\u8981\u6807\u5fd7\u3002\u5b83\u5e76\u975e\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u672c\u7f16\u8f91\u5de5\u5177\uff0c\u800c\u662f\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574\u7684<strong>VS Code\uff08Visual Studio Code\uff09<\/strong>\u6838\u5fc3\u5b9e\u4f8b\uff0c\u65e8\u5728\u4e3a\u60a8\u63d0\u4f9b\u4e13\u4e1a\u3001\u9ad8\u6548\u3001\u65e0\u7f1d\u7684\u7b56\u7565\u7f16\u5199\u4e0e\u8c03\u8bd5\u4f53\u9a8c\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/\u5fae\u4fe1\u56fe\u7247_2025-11-12_213722_879-scaled.png\" alt=\"\" \/><\/p>\n<h2>1. \u5168\u65b0\u529f\u80fd\uff0c\u4e00\u7779\u4e3a\u5feb<\/h2>\n<h3>1.1 \u5b8c\u6574\u7684 VS Code \u6838\u5fc3\u4f53\u9a8c<\/h3>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728KhQuant\u5ba2\u6237\u7aef\u5185\u90e8\uff0c\u62e5\u6709VS Code\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u5305\u62ec\uff1a<br \/>\n*   <strong>\u719f\u6089\u7684\u754c\u9762\u4e0e\u64cd\u4f5c<\/strong>\uff1a\u5bf9\u4e8eVS Code\u7684\u8001\u7528\u6237\uff0c\u65e0\u9700\u4efb\u4f55\u5b66\u4e60\u6210\u672c\uff0c\u5373\u523b\u4e0a\u624b\u3002<br \/>\n*   <strong>\u5f3a\u5927\u7684\u63d2\u4ef6\u751f\u6001<\/strong>\uff1a\u60a8\u53ef\u4ee5\u81ea\u7531\u5b89\u88c5\u6d77\u91cf\u7684VS Code\u63d2\u4ef6\uff0c\u4f8b\u5982\u5404\u7c7bAI\u7f16\u7a0b\u52a9\u624b\u3001\u4e3b\u9898\u3001\u4ee3\u7801\u68c0\u67e5\u5de5\u5177\u7b49\uff0c\u6781\u5927\u5730\u6269\u5c55\u4e86\u7f16\u8f91\u5668\u7684\u80fd\u529b\u3002<br \/>\n*   <strong>\u667a\u80fd\u4ee3\u7801\u63d0\u793a\u4e0e\u8865\u5168<\/strong>\uff1a\u5b89\u88c5Python\u5b98\u65b9\u63d2\u4ef6\u540e\uff0c\u5373\u53ef\u62e5\u6709\u9876\u7ea7\u7684\u4ee3\u7801\u5206\u6790\u548c\u667a\u80fd\u63d0\u793a\u670d\u52a1\u3002<br \/>\n*   <strong>\u548c\u8c10\u7684\u89c6\u89c9\u4f53\u9a8c<\/strong>\uff1a\u5185\u7f6eVS Code\u7684\u754c\u9762\u4e3b\u9898\u4e0eKhQuant\u7cfb\u7edf\u4fdd\u6301\u7edf\u4e00\uff0c\u786e\u4fdd\u4e86\u89c6\u89c9\u4e0a\u7684\u548c\u8c10\u4e0e\u7f8e\u89c2\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640.gif\" alt=\"\" \/><\/p>\n<h3>1.2 \u4e0e\u770b\u6d77\u5ba2\u6237\u7aef\u7684\u65e0\u7f1d\u8054\u52a8<\/h3>\n<p>\u5185\u7f6e\u7f16\u8f91\u5668\u4e0e\u770b\u6d77\u5ba2\u6237\u7aef\u7d27\u5bc6\u5173\u8054\uff0c\u5b9e\u73b0\u4e86\u771f\u6b63\u7684\u201c\u4e00\u4f53\u5316\u201d\u5f00\u53d1\u8c03\u8bd5\u4f53\u9a8c\u3002<br \/>\n*   <strong>\u81ea\u52a8\u52a0\u8f7d\u7b56\u7565<\/strong>\uff1a\u5728\u4e3b\u754c\u9762\u5de6\u4fa7\u914d\u7f6e\u9762\u677f\u4e2d\u8bbe\u7f6e\u597d\u7b56\u7565\u6587\u4ef6\u8def\u5f84\u540e\uff0c\u70b9\u51fb\u201c\u7b56\u7565\u7f16\u8f91\u5668\u201d\u83dc\u5355\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5728VS Code\u4e2d\u6253\u5f00\u5bf9\u5e94\u7684\u7b56\u7565\u6587\u4ef6\u3002<br \/>\n*   <strong>\u81ea\u52a8\u8fdb\u5165\u8c03\u8bd5\u6a21\u5f0f<\/strong>\uff1a\u5728\u7f16\u8f91\u5668\u6253\u5f00\u7684\u72b6\u6001\u4e0b\uff0c\u4ece\u4e3b\u754c\u9762\u70b9\u51fb\u201c\u5f00\u59cb\u56de\u6d4b\u201d\uff0c\u7cfb\u7edf\u5c06\u81ea\u52a8\u542f\u7528\u8c03\u8bd5\u6a21\u5f0f\u3002\u60a8\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\uff0c\u5bf9\u7b56\u7565\u8fdb\u884c\u5355\u6b65\u8ddf\u8e2a\u3001\u67e5\u770b\u53d8\u91cf\uff0c\u6df1\u5165\u6d1e\u5bdf\u7b56\u7565\u8fd0\u884c\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-1.gif\" alt=\"\" \/><\/p>\n<h3>1.3 \u96f6\u914d\u7f6e\uff0c\u5f00\u7bb1\u5373\u7528<\/h3>\n<p>\u4e3a\u4e86\u8ba9\u60a8\u80fd\u4e13\u6ce8\u4e8e\u7b56\u7565\u903b\u8f91\u672c\u8eab\uff0c\u6240\u6709\u7e41\u6742\u7684\u540e\u53f0\u914d\u7f6e\u90fd\u5df2\u7531\u7cfb\u7edf\u81ea\u52a8\u5316\u5904\u7406\uff1a<br \/>\n*   <strong>\u81ea\u52a8\u751f\u6210\u8c03\u8bd5\u914d\u7f6e<\/strong>\uff1a\u7cfb\u7edf\u4f1a\u5728\u60a8\u7684\u5de5\u4f5c\u533a\u5185\u81ea\u52a8\u521b\u5efa\u5e76\u914d\u7f6e\u597d<code>.vscode\/launch.json<\/code>\u6587\u4ef6\u3002<br \/>\n*   <strong>\u81ea\u52a8\u914d\u7f6ePython\u73af\u5883<\/strong>\uff1a\u7cfb\u7edf\u4f1a\u81ea\u52a8\u751f\u6210<code>.vscode\/settings.json<\/code>\u6587\u4ef6\uff0c\u5c06Python\u89e3\u91ca\u5668\u6307\u5411\u5f53\u524d\u73af\u5883\uff0c\u5e76\u914d\u7f6e\u597d\u4ee3\u7801\u8865\u5168\u8def\u5f84\uff0c\u5b8c\u7f8e\u89e3\u51b3<code>khQuant<\/code>\u5e93\u5bfc\u5165\u65e0\u4ee3\u7801\u63d0\u793a\u7684\u95ee\u9898\u3002<br \/>\n*   <strong>\u72ec\u7acb\u7eaf\u51c0\u7684\u73af\u5883<\/strong>\uff1a\u5185\u7f6eVS Code\u62e5\u6709\u72ec\u7acb\u7684\u6269\u5c55\u548c\u7528\u6237\u6570\u636e\u76ee\u5f55\uff0c\u4e0e\u60a8\u7535\u8111\u4e0a\u53ef\u80fd\u5df2\u6709\u7684\u5176\u4ed6VS Code\u73af\u5883\u5b8c\u5168\u9694\u79bb\uff0c\u4e92\u4e0d\u5e72\u6270\u3002<\/p>\n<h2>2. \u8c03\u8bd5\u6d41\u7a0b\u6307\u5357<\/h2>\n<p><strong>\u6e29\u99a8\u63d0\u793a<\/strong>\uff1a\u65ad\u70b9\u8c03\u8bd5\u529f\u80fd\u4e3b\u8981\u9762\u5411\u5177\u5907\u4e00\u5b9aPython\u4ee3\u7801\u57fa\u7840\u7684\u7528\u6237\uff0c\u662f\u7cbe\u51c6\u5b9a\u4f4d\u4ee3\u7801\u95ee\u9898\u7684\u5229\u5668\u3002<\/p>\n<h3>\u51c6\u5907\u5de5\u4f5c\uff1a\u5b89\u88c5VS Code\u672c\u4f53<\/h3>\n<p>\u4e3a\u4e86\u5c3d\u53ef\u80fd\u63a7\u5236\u770b\u6d77\u5b89\u88c5\u5305\u7684\u4f53\u79ef\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u81ea\u7531\u5347\u7ea7\u548c\u7ba1\u7406VS Code\uff0c<strong>VS Code\u8f6f\u4ef6\u672c\u8eab\u5e76\u672a\u88ab\u6253\u5305\u8fdb\u770b\u6d77\u5b89\u88c5\u5305\u4e2d<\/strong>\u3002\u56e0\u6b64\uff0c\u5728\u9996\u6b21\u4f7f\u7528\u524d\uff0c\u60a8\u9700\u8981\u5148\u5728\u60a8\u7684\u7535\u8111\u4e0a\u5b89\u88c5VS Code\u3002<br \/>\n*   <strong>\u4e0b\u8f7d\u5730\u5740<\/strong>\uff1a<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/code.visualstudio.com\/download\">https:\/\/code.visualstudio.com\/download<\/a><\/p>\n<h3>\u8c03\u8bd5\u6b65\u9aa4<\/h3>\n<p>\u5b89\u88c5\u597dVS Code\u540e\uff0c\u5c31\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u5f00\u59cb\u60a8\u7684\u9996\u6b21\u8c03\u8bd5\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u7b56\u7565\u6587\u4ef6<\/strong><br \/>\n\u5728\u770b\u6d77\u5ba2\u6237\u7aef\u4e3b\u754c\u9762\uff0c\u9996\u5148\u901a\u8fc7\u5de6\u4fa7\u914d\u7f6e\u9762\u677f\uff0c\u9009\u62e9\u60a8\u5e0c\u671b\u8fdb\u884c\u7f16\u8f91\u548c\u8c03\u8bd5\u7684\u7b56\u7565\u6587\u4ef6\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640.png\" alt=\"\" \/><\/p>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u542f\u52a8\u7f16\u8f91\u5668\u5e76\u5b89\u88c5Python\u63d2\u4ef6 (\u9996\u6b21)<\/strong><br \/>\n\u70b9\u51fb\u4e3b\u754c\u9762\u5de5\u5177\u680f\u4e0a\u7684\u3010<strong>\u7f16\u8f91\u5668<\/strong>\u3011\u6309\u94ae\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-1.png\" alt=\"\" \/><br \/>\n*   <strong>\u9996\u6b21\u542f\u52a8\u65f6<\/strong>\uff1aVS Code\u901a\u5e38\u4f1a\u5728\u7a97\u53e3\u53f3\u4e0b\u89d2\u63d0\u793a\u60a8\u5b89\u88c5\u63a8\u8350\u7684\u201c<strong>Python<\/strong>\u201d\u6269\u5c55\u3002\u8bf7\u52a1\u5fc5\u70b9\u51fb<code>Install<\/code>\u8fdb\u884c\u5b89\u88c5\u3002\u8fd9\u662f\u83b7\u5f97\u4ee3\u7801\u63d0\u793a\u3001\u8bed\u6cd5\u9ad8\u4eae\u548c\u8c03\u8bd5\u80fd\u529b\u7684\u5173\u952e\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-2.png\" alt=\"\" \/><\/p>\n<p><strong>\u7b2c\u4e09\u6b65\uff1a\u8bbe\u7f6e\u65ad\u70b9<\/strong><br \/>\nPython\u63d2\u4ef6\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728\u7f16\u8f91\u5668\u4e2d\u627e\u5230\u60a8\u5173\u5fc3\u7684\u4ee3\u7801\u884c\uff08\u4f8b\u5982\uff0c\u4e00\u4e2a\u4e70\u5165\/\u5356\u51fa\u6761\u4ef6\u7684\u5224\u65ad\u884c\uff09\uff0c\u5728<strong>\u884c\u53f7\u7684\u5de6\u4fa7\u7a7a\u767d\u5904\u5355\u51fb\u9f20\u6807<\/strong>\uff0c\u5373\u53ef\u8bbe\u7f6e\u4e00\u4e2a\u7ea2\u8272\u7684<strong>\u65ad\u70b9<\/strong>\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-3.png\" alt=\"\" \/><\/p>\n<p><strong>\u7b2c\u56db\u6b65\uff1a\u5f00\u59cb\u8c03\u8bd5<\/strong><br \/>\n\u56de\u5230\u770b\u6d77\u4e3b\u754c\u9762\uff0c\u70b9\u51fb\u4e2d\u95f4\u9762\u677f\u7684\u201c<strong>\u5f00\u59cb\u8fd0\u884c!<\/strong>\u201d\u6309\u94ae\u3002<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-4.png\"><\/a><\/p>\n<ul>\n<li><strong>\u89e6\u53d1\u8c03\u8bd5<\/strong>\uff1a\u7b56\u7565\u4ee3\u7801\u5c06\u4f1a\u6b63\u5e38\u6267\u884c\uff0c\u76f4\u5230\u8fd0\u884c\u81f3\u60a8\u8bbe\u7f6e\u4e86\u65ad\u70b9\u7684\u4ee3\u7801\u884c\u5904\u4f1a\u81ea\u52a8\u6682\u505c\u3002<\/li>\n<li><strong>\u81ea\u52a8\u805a\u7126<\/strong>\uff1a\u6b64\u65f6\uff0c\u5185\u7f6eVS Code\u7a97\u53e3\u5c06\u81ea\u52a8\u5f39\u51fa\u5e76\u83b7\u5f97\u7126\u70b9\uff0c\u8fdb\u5165\u8c03\u8bd5\u89c6\u56fe\u3002\u60a8\u53ef\u4ee5\u5728\u6b64\u6e05\u6670\u5730\u770b\u5230\u5f53\u524d\u6240\u6709\u53d8\u91cf\u7684\u503c\uff0c\u5e76\u4f7f\u7528\u9876\u90e8\u7684\u8c03\u8bd5\u5de5\u5177\u680f\u8fdb\u884c<strong>\u5355\u6b65\u6267\u884c<\/strong>\u3001<strong>\u7ee7\u7eed\u6267\u884c<\/strong>\u7b49\u64cd\u4f5c\uff0c\u5f7b\u5e95\u6d1e\u5bdf\u7b56\u7565\u8fd0\u884c\u7684\u6bcf\u4e00\u4e2a\u77ac\u95f4\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/640-5.png\" alt=\"\" \/><\/p>\n<h2>3. \u8865\u5145\u8bf4\u660e<\/h2>\n<ol>\n<li><strong>\u5173\u4e8e\u65b0\u5efa\u7b56\u7565<\/strong>\uff1a\u5982\u679c\u5728\u70b9\u51fb\u3010\u7f16\u8f91\u5668\u3011\u6309\u94ae\u65f6\uff0c\u4e3b\u754c\u9762\u5c1a\u672a\u9009\u62e9\u4efb\u4f55\u7b56\u7565\u6587\u4ef6\uff0c\u7cfb\u7edf\u4f1a\u5f39\u7a97\u63d0\u793a\u60a8\u662f\u5426\u9700\u8981\u65b0\u5efa\u4e00\u4e2a\u7b56\u7565\u3002\u5728\u9009\u62e9\u597d\u4fdd\u5b58\u8def\u5f84\u5e76\u8bbe\u7f6e\u597d\u6587\u4ef6\u540d\u540e\uff0c\u70b9\u51fb\u786e\u5b9a\uff0c\u7f16\u8f91\u5668\u4fbf\u4f1a\u4e3a\u60a8\u6253\u5f00\u4e00\u4e2a\u5168\u65b0\u7684<code>.py<\/code>\u6587\u4ef6\u6a21\u677f\u3002\u540e\u7eed\u5728\u4e3b\u754c\u9762\u8fd0\u884c\u7b56\u7565\u65f6\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5173\u8054\u5230\u8fd9\u4e2a\u65b0\u521b\u5efa\u7684\u6587\u4ef6\u3002<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/wp_editor_md_54c64d6f4dd2ea251adf7fd4f1214bf4.jpg\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/wp_editor_md_54c64d6f4dd2ea251adf7fd4f1214bf4.jpg\" alt=\"\" \/><\/a><\/li>\n<li><strong>\u5173\u4e8e\u91cd\u590d\u6253\u5f00<\/strong>\uff1a\u53d7\u9650\u4e8e\u5f53\u524d\u7684\u6280\u672f\u673a\u5236\uff0c\u5185\u7f6e\u7f16\u8f91\u5668\u5728\u5173\u95ed\u540e\u65e0\u6cd5\u5728\u5f53\u524d\u4f1a\u8bdd\u4e2d\u88ab\u7b2c\u4e8c\u6b21\u6253\u5f00\u3002\u5982\u679c\u9700\u8981\u91cd\u65b0\u6253\u5f00\u7f16\u8f91\u5668\uff0c\u8bf7\u5148\u5173\u95ed\u5e76\u91cd\u542fKhQuant\u4e3b\u7a0b\u5e8f\u3002<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/wp_editor_md_50da6e190216271149bb683fc3f68635.jpg\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/khQuant\/wp-content\/uploads\/2025\/11\/wp_editor_md_50da6e190216271149bb683fc3f68635.jpg\" alt=\"\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>V3\u7248\u672c\u65b0\u589e\u7684\u5185\u7f6e\u4ee3\u7801\u7f16\u8f91\u5668\u662f\u5176\u8fc8\u5411\u4e00\u7ad9\u5f0f\u5f00\u53d1\u73af\u5883\u7684\u6700\u91cd\u8981\u6807\u5fd7\u3002\u5b83\u5e76\u975e\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u672c\u7f16\u8f91\u5de5\u5177\uff0c\u800c\u662f\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template\/caidan.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-673","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/pages\/673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/comments?post=673"}],"version-history":[{"count":6,"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/pages\/673\/revisions"}],"predecessor-version":[{"id":726,"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/pages\/673\/revisions\/726"}],"wp:attachment":[{"href":"https:\/\/khsci.com\/khQuant\/wp-json\/wp\/v2\/media?parent=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}