{"id":353,"date":"2025-01-12T07:54:13","date_gmt":"2025-01-11T23:54:13","guid":{"rendered":"http:\/\/sqtcw.cn\/?p=353"},"modified":"2025-01-12T07:54:13","modified_gmt":"2025-01-11T23:54:13","slug":"%e5%ae%89%e8%a3%85-python-3-7-%e5%92%8c-3-8-%e6%97%b6%e9%80%89%e6%8b%a9%e5%90%88%e9%80%82%e5%ae%89%e8%a3%85%e5%8c%85%e7%9a%84%e4%b8%80%e4%ba%9b%e5%bb%ba%e8%ae%ae","status":"publish","type":"post","link":"http:\/\/www.cnitw.com\/?p=353","title":{"rendered":"\u5b89\u88c5 Python 3.7 \u548c 3.8 \u65f6\u9009\u62e9\u5408\u9002\u5b89\u88c5\u5305\u7684\u4e00\u4e9b\u5efa\u8bae"},"content":{"rendered":"\n<p>\u4ee5\u4e0b\u662f\u5728\u5b89\u88c5 Python 3.7 \u548c 3.8 \u65f6\u9009\u62e9\u5408\u9002\u5b89\u88c5\u5305\u7684\u4e00\u4e9b\u5efa\u8bae\uff1a<\/p>\n\n\n\n<p>**\u4e00\u3001\u64cd\u4f5c\u7cfb\u7edf**<\/p>\n\n\n\n<p>1. Windows\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5bf9\u4e8e Windows \u7cfb\u7edf\uff0c\u53ef\u4ee5\u4ece Python \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3002\u901a\u5e38\u6709\u4e24\u79cd\u7c7b\u578b\u7684\u5b89\u88c5\u5305\u53ef\u4f9b\u9009\u62e9\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; Windows Installer (64-bit) \/ (32-bit)\uff1a\u8fd9\u662f\u4e00\u4e2a\u4f20\u7edf\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u4f1a\u5f15\u5bfc\u4f60\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u548c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7b49\u9009\u9879\u3002\u9002\u5408\u5927\u591a\u6570\u7528\u6237\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; Windows embeddable package (64-bit) \/ (32-bit)\uff1a\u8fd9\u4e2a\u5b89\u88c5\u5305\u662f\u4e00\u4e2a\u53ef\u5d4c\u5165\u7684\u7248\u672c\uff0c\u4e0d\u5305\u542b\u5b89\u88c5\u7a0b\u5e8f\uff0c\u9002\u5408\u9700\u8981\u5c06 Python \u96c6\u6210\u5230\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u5f00\u53d1\u8005\u3002\u5b83\u4e0d\u4f1a\u81ea\u52a8\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u9700\u8981\u624b\u52a8\u914d\u7f6e\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u6839\u636e\u4f60\u7684\u7cfb\u7edf\u67b6\u6784\uff0864 \u4f4d\u6216 32 \u4f4d\uff09\u9009\u62e9\u76f8\u5e94\u7684\u5b89\u88c5\u5305\u3002\u53ef\u4ee5\u5728\u201c\u63a7\u5236\u9762\u677f\u201d&gt;\u201c\u7cfb\u7edf\u548c\u5b89\u5168\u201d&gt;\u201c\u7cfb\u7edf\u201d\u4e2d\u67e5\u770b\u7cfb\u7edf\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>2. macOS\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5728 macOS \u4e0a\uff0c\u53ef\u4ee5\u4ece Python \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3002\u901a\u5e38\u6709\u4ee5\u4e0b\u51e0\u79cd\u9009\u62e9\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; macOS 64-bit installer\uff1a\u9002\u5408\u5927\u591a\u6570 Mac \u7528\u6237\uff0c\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; macOS 64-bit\/32-bit installer\uff1a\u5982\u679c\u4f60\u7684 Mac \u7cfb\u7edf\u6bd4\u8f83\u65e7\uff0c\u53ef\u80fd\u9700\u8981\u8fd9\u4e2a\u5b89\u88c5\u5305\u6765\u652f\u6301 32 \u4f4d\u5e94\u7528\u7a0b\u5e8f\u3002\u4f46\u968f\u7740 macOS \u7684\u53d1\u5c55\uff0c32 \u4f4d\u5e94\u7528\u7a0b\u5e8f\u7684\u652f\u6301\u9010\u6e10\u51cf\u5c11\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u4e5f\u53ef\u4ee5\u4f7f\u7528 Homebrew \u7b49\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5 Python\u3002\u8fd9\u79cd\u65b9\u5f0f\u66f4\u52a0\u7075\u6d3b\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ba1\u7406\u591a\u4e2a\u7248\u672c\u7684 Python\u3002<\/p>\n\n\n\n<p>3. Linux\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u4e0d\u540c\u7684 Linux \u53d1\u884c\u7248\u6709\u4e0d\u540c\u7684\u5b89\u88c5\u65b9\u6cd5\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5 Python\u3002\u4f8b\u5982\uff0c\u5728 Ubuntu \u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528 `apt-get` \u547d\u4ee4\u5b89\u88c5 Python\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; `sudo apt-get install python3.7`\uff08\u6216 `python3.8`\uff09<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u4e5f\u53ef\u4ee5\u4ece Python \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u4ee3\u7801\u5305\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\uff0c\u4f46\u8fd9\u9700\u8981\u4e00\u5b9a\u7684\u6280\u672f\u77e5\u8bc6\u548c\u7ecf\u9a8c\u3002<\/p>\n\n\n\n<p>**\u4e8c\u3001\u5b89\u88c5\u76ee\u7684**<\/p>\n\n\n\n<p>1. \u5f00\u53d1\u73af\u5883\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5982\u679c\u662f\u7528\u4e8e\u5f00\u53d1\uff0c\u5efa\u8bae\u9009\u62e9\u5b8c\u6574\u7684\u5b89\u88c5\u5305\uff0c\u5305\u62ec\u6807\u51c6\u5e93\u548c\u5f00\u53d1\u5de5\u5177\u3002\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u5f00\u53d1\u548c\u8c03\u8bd5\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u53ef\u4ee5\u8003\u8651\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u5982 IPython\u3001Jupyter Notebook \u7b49\uff0c\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n\n\n\n<p>2. \u751f\u4ea7\u73af\u5883\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u52a0\u7cbe\u7b80\u7684\u5b89\u88c5\u5305\uff0c\u53ea\u5305\u542b\u5fc5\u8981\u7684\u7ec4\u4ef6\u3002\u53ef\u4ee5\u9009\u62e9\u6700\u5c0f\u5316\u5b89\u88c5\uff0c\u6216\u8005\u4f7f\u7528\u5bb9\u5668\u5316\u6280\u672f\uff08\u5982 Docker\uff09\u6765\u90e8\u7f72 Python \u5e94\u7528\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u786e\u4fdd\u5b89\u88c5\u7684 Python \u7248\u672c\u4e0e\u751f\u4ea7\u73af\u5883\u4e2d\u7684\u5176\u4ed6\u7ec4\u4ef6\u517c\u5bb9\uff0c\u5e76\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u548c\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<p>**\u4e09\u3001\u7248\u672c\u7279\u6027**<\/p>\n\n\n\n<p>1. \u65b0\u7279\u6027\u9700\u6c42\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5982\u679c\u9700\u8981\u4f7f\u7528\u7279\u5b9a\u7248\u672c\u7684\u65b0\u7279\u6027\uff0c\u5982 Python 3.8 \u7684\u8d4b\u503c\u8868\u8fbe\u5f0f\uff08\u6d77\u8c61\u8fd0\u7b97\u7b26\uff09\u7b49\uff0c\u53ef\u4ee5\u9009\u62e9\u76f8\u5e94\u7684\u7248\u672c\u3002\u4f46\u8981\u6ce8\u610f\u65b0\u7279\u6027\u53ef\u80fd\u4f1a\u5e26\u6765\u4e00\u4e9b\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u9700\u8981\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u3002<\/p>\n\n\n\n<p>2. \u7a33\u5b9a\u6027\u8003\u8651\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u5982\u679c\u5bf9\u7a33\u5b9a\u6027\u8981\u6c42\u8f83\u9ad8\uff0c\u53ef\u4ee5\u9009\u62e9\u8f83\u4e3a\u6210\u719f\u7684\u7248\u672c\uff0c\u5982 Python 3.7\u3002\u7ecf\u8fc7\u4e00\u6bb5\u65f6\u95f4\u7684\u4f7f\u7528\u548c\u6d4b\u8bd5\uff0c\u8fd9\u4e9b\u7248\u672c\u901a\u5e38\u66f4\u52a0\u7a33\u5b9a\u53ef\u9760\u3002<\/p>\n\n\n\n<p>**\u56db\u3001\u5176\u4ed6\u56e0\u7d20**<\/p>\n\n\n\n<p>1. \u793e\u533a\u652f\u6301\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u9009\u62e9\u4e00\u4e2a\u6709\u6d3b\u8dc3\u793e\u533a\u652f\u6301\u7684\u7248\u672c\uff0c\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u83b7\u5f97\u5e2e\u52a9\u548c\u89e3\u51b3\u95ee\u9898\u3002\u53ef\u4ee5\u67e5\u770b\u5728\u7ebf\u8bba\u575b\u3001\u90ae\u4ef6\u5217\u8868\u3001\u5f00\u6e90\u9879\u76ee\u7b49\u6e20\u9053\uff0c\u4e86\u89e3\u4e0d\u540c\u7248\u672c\u7684\u793e\u533a\u6d3b\u8dc3\u5ea6\u3002<\/p>\n\n\n\n<p>2. \u5e93\u7684\u652f\u6301\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u68c0\u67e5\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u5e93\u5728\u4e0d\u540c\u7248\u672c\u4e0a\u7684\u53ef\u7528\u6027\u548c\u517c\u5bb9\u6027\u3002\u786e\u4fdd\u9009\u62e9\u7684\u7248\u672c\u80fd\u591f\u6ee1\u8db3\u9879\u76ee\u7684\u4f9d\u8d56\u9700\u6c42\u3002<\/p>\n\n\n\n<p>3. \u672a\u6765\u53d1\u5c55\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&#8211; \u8003\u8651 Python \u8bed\u8a00\u7684\u672a\u6765\u53d1\u5c55\u8d8b\u52bf\uff0c\u9009\u62e9\u4e00\u4e2a\u4e0e\u8bed\u8a00\u53d1\u5c55\u65b9\u5411\u76f8\u7b26\u7684\u7248\u672c\uff0c\u4ee5\u4fbf\u5728\u672a\u6765\u80fd\u591f\u66f4\u5bb9\u6613\u5730\u8fdb\u884c\u5347\u7ea7\u548c\u7ef4\u62a4\u3002<\/p>\n\n\n\n<p>\u603b\u4e4b\uff0c\u5728\u9009\u62e9\u5b89\u88c5 Python 3.7 \u548c 3.8 \u7684\u5b89\u88c5\u5305\u65f6\uff0c\u9700\u8981\u8003\u8651\u64cd\u4f5c\u7cfb\u7edf\u3001\u5b89\u88c5\u76ee\u7684\u3001\u7248\u672c\u7279\u6027\u548c\u5176\u4ed6\u56e0\u7d20\u3002\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u548c\u60c5\u51b5\u8fdb\u884c\u9009\u62e9\uff0c\u5e76\u5728\u5b89\u88c5\u540e\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u4ee5\u786e\u4fdd\u5b89\u88c5\u7684\u7248\u672c\u80fd\u591f\u6ee1\u8db3\u9879\u76ee\u7684\u8981\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u662f\u5728\u5b89\u88c5 Python 3.7 \u548c 3.8 \u65f6\u9009\u62e9\u5408\u9002\u5b89\u88c5\u5305\u7684\u4e00\u4e9b\u5efa\u8bae\uff1a **\u4e00\u3001\u64cd\u4f5c\u7cfb\u7edf** 1. Windows\uff1a &nbsp;&nbsp;&nbsp;&#8211; \u5bf9\u4e8e Windows \u7cfb\u7edf\uff0c\u53ef\u4ee5\u4ece Python \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3002\u901a\u5e38\u6709\u4e24\u79cd\u7c7b\u578b\u7684\u5b89\u88c5\u5305\u53ef\u4f9b\u9009\u62e9\uff1a &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; Windows Installer (64-bit) \/ (32-bit)\uff1a\u8fd9\u662f\u4e00\u4e2a\u4f20\u7edf\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u4f1a\u5f15\u5bfc\u4f60\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u548c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7b49\u9009\u9879\u3002\u9002\u5408\u5927\u591a\u6570\u7528\u6237\u3002 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8211; Windows embeddable package (64-bit) \/ (32-bit)\uff1a\u8fd9\u4e2a\u5b89\u88c5\u5305\u662f\u4e00\u4e2a\u53ef\u5d4c\u5165\u7684\u7248\u672c\uff0c\u4e0d\u5305\u542b\u5b89\u88c5\u7a0b\u5e8f\uff0c\u9002\u5408\u9700\u8981\u5c06 Python \u96c6\u6210\u5230\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u5f00\u53d1\u8005\u3002\u5b83\u4e0d\u4f1a\u81ea\u52a8\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u9700\u8981\u624b\u52a8\u914d\u7f6e\u3002&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=353"}],"version-history":[{"count":0,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/353\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}