{"id":205378,"date":"2025-05-29T15:50:18","date_gmt":"2025-05-29T07:50:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205378\/"},"modified":"2025-05-29T15:50:18","modified_gmt":"2025-05-29T07:50:18","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8windows%e7%b3%bb%e7%bb%9f%e4%b8%ad%e6%89%93%e5%8c%85%e9%9c%80%e8%a6%81%e7%89%b9%e5%ae%9apython%e7%89%88%e6%9c%ac3-11-6%e7%9a%84%e8%84%9a%e6%9c%ac%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205378\/","title":{"rendered":"\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5305\u9700\u8981\u7279\u5b9aPython\u7248\u672c(3.11.6)\u7684\u811a\u672c\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5305\u9700\u8981\u7279\u5b9aPython\u7248\u672c(3.11.6)\u7684\u811a\u672c\uff1f<\/h1>\n<p>\u672c\u7bc7\u6587\u7ae0\u7ed9\u5927\u5bb6\u5206\u4eab\u300a\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5305\u9700\u8981\u7279\u5b9aPython\u7248\u672c(3.11.6)\u7684\u811a\u672c\uff1f\u300b\uff0c\u8986\u76d6\u4e86\u6587\u7ae0\u7684\u5e38\u89c1\u57fa\u7840\u77e5\u8bc6\uff0c\u5176\u5b9e\u4e00\u4e2a\u8bed\u8a00\u7684\u5168\u90e8\u77e5\u8bc6\u70b9\u4e00\u7bc7\u6587\u7ae0\u662f\u4e0d\u53ef\u80fd\u8bf4\u5b8c\u7684\uff0c\u4f46\u5e0c\u671b\u901a\u8fc7\u8fd9\u4e9b\u95ee\u9898\uff0c\u8ba9\u8bfb\u8005\u5bf9\u81ea\u5df1\u7684\u638c\u63e1\u7a0b\u5ea6\u6709\u4e00\u5b9a\u7684\u8ba4\u8bc6(B \u6570)\uff0c\u4ece\u800c\u5f25\u8865\u81ea\u5df1\u7684\u4e0d\u8db3\uff0c\u66f4\u597d\u7684\u638c\u63e1\u5b83\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241130\/1732946796674aab6cc614d.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u7528\u7279\u5b9a\u7248\u672c\u8fd0\u884c\u811a\u672c\u5e76\u6253\u5305\u8fdb\u6587\u4ef6\u5939<\/strong><\/p>\n<p>\u5728\u9700\u8981\u7279\u5b9a\u7248\u672c\uff083.11.6\uff09\u8fd0\u884c\u811a\u672c\u4f46\u53c8\u4f7f\u7528 3.12 \u7248\u4f5c\u4e3a\u4e3b\u529b\u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u5c06\u811a\u672c\u6253\u5305\u5230\u6587\u4ef6\u5939\u4e2d\u5e76\u6b63\u5e38\u6267\u884c\uff1f<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u5bf9\u4e8e linux \u7cfb\u7edf\uff0c\u4f7f\u7528 docker \u662f\u7406\u60f3\u7684\u9009\u62e9\u3002\u4f46\u5bf9\u4e8e windows \u7cfb\u7edf\uff0c\u63a8\u8350\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>\u5177\u4f53\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li>\u4e0b\u8f7d python 3.11.6 \u5d4c\u5165\u5f0f\u7248\u672c\uff08https:\/\/www.python.org\/ftp\/python\/3.11.6\/\uff09\uff0c\u89e3\u538b\u5230\u4e00\u4e2a\u76ee\u5f55\uff08\u4f8b\u5982 d:\/yourapp\/\uff09\u3002<\/li>\n<li>\u4e0b\u8f7d\u5b89\u88c5 pip \u5de5\u5177\uff08https:\/\/bootstrap.pypa.io\/get-pip.py\uff09\u3002<\/li>\n<li>\u7f16\u8f91 python311._pth \u6587\u4ef6\uff0c\u53d6\u6d88\u6ce8\u91ca\u3002<\/li>\n<li>\u4f7f\u7528 pip \u5b89\u88c5\u4f9d\u8d56\u5305\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u51c6\u5907 bat \u811a\u672c\uff1a<\/li>\n<\/ol>\n<pre>@echo off\nREM \u7528 python.exe \u8c03\u7528 run.py \u5e76\u4f20\u9012\u6240\u6709\u8f93\u5165\u53c2\u6570\n.\\python-3.11.6-embed-amd64\\python.exe .\\code\\run.py %*<\/pre>\n<ol>\n<li>\u8fd0\u884c bat \u811a\u672c\u5373\u53ef\u6253\u5305\u811a\u672c\u5e76\u6b63\u5e38\u6267\u884c\u3002<\/li>\n<\/ol>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300a\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5305\u9700\u8981\u7279\u5b9aPython\u7248\u672c(3.11.6)\u7684\u811a\u672c\uff1f\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591a\u6587\u7ae0\u77e5\u8bc6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5305\u9700&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-205378","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=205378"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205378\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}