{"id":362,"date":"2025-01-12T08:33:14","date_gmt":"2025-01-12T00:33:14","guid":{"rendered":"http:\/\/sqtcw.cn\/?p=362"},"modified":"2025-01-12T08:33:14","modified_gmt":"2025-01-12T00:33:14","slug":"python%e4%b8%8b%e8%bd%bd%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.cnitw.com\/?p=362","title":{"rendered":"Python\u4e0b\u8f7d\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u4ee5\u4e0b\u662f\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4e0b\u8f7d Python \u7684\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p><strong>\u4e00\u3001Windows \u7cfb\u7edf<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee Python \u5b98\u65b9\u7f51\u7ad9\uff1a<a href=\"https:\/\/www.python.org\/\">https:\/\/www.python.org\/<\/a>\u3002<\/li>\n\n\n\n<li>\u5728\u5b98\u7f51\u9996\u9875\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u201cDownloads\u201d\u83dc\u5355\u3002\u5c06\u9f20\u6807\u60ac\u505c\u5728\u8be5\u83dc\u5355\u4e0a\uff0c\u4f1a\u51fa\u73b0\u4e0d\u540c\u7248\u672c\u7684 Python \u4e0b\u8f7d\u9009\u9879\u3002<\/li>\n\n\n\n<li>\u9009\u62e9\u4f60\u9700\u8981\u7684\u7248\u672c\uff0c\u6bd4\u5982 Python 3.7 \u6216 3.8\u3002\u70b9\u51fb\u76f8\u5e94\u7684\u4e0b\u8f7d\u94fe\u63a5\u3002<\/li>\n\n\n\n<li>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u627e\u5230\u5b89\u88c5\u6587\u4ef6\u5e76\u53cc\u51fb\u8fd0\u884c\u5b83\u3002<\/li>\n\n\n\n<li>\u5728\u5b89\u88c5\u5411\u5bfc\u4e2d\uff0c\u6309\u7167\u63d0\u793a\u9010\u6b65\u64cd\u4f5c\u3002\u53ef\u4ee5\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u63a5\u53d7\u9ed8\u8ba4\u8bbe\u7f6e\u3002\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u76f4\u63a5\u4f7f\u7528 Python\u3002<\/li>\n\n\n\n<li>\u7b49\u5f85\u5b89\u88c5\u8fc7\u7a0b\u5b8c\u6210\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u4e8c\u3001macOS \u7cfb\u7edf<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u540c\u6837\u8bbf\u95ee Python \u5b98\u65b9\u7f51\u7ad9\u3002<\/li>\n\n\n\n<li>\u9009\u62e9\u9002\u5408 macOS \u7684\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u901a\u5e38\u6709\u5b89\u88c5\u5305\uff08.pkg \u6587\u4ef6\uff09\u53ef\u4f9b\u9009\u62e9\u3002<\/li>\n\n\n\n<li>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u5b89\u88c5\u5305\u6587\u4ef6\u3002<\/li>\n\n\n\n<li>\u5728\u5b89\u88c5\u5411\u5bfc\u4e2d\uff0c\u6309\u7167\u63d0\u793a\u8fdb\u884c\u64cd\u4f5c\u3002\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u53ef\u80fd\u4e0d\u9700\u8981\u50cf Windows \u90a3\u6837\u7279\u522b\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u4e09\u3001Linux \u7cfb\u7edf<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4e0d\u540c\u7684 Linux \u53d1\u884c\u7248\u6709\u4e0d\u540c\u7684\u5b89\u88c5\u65b9\u6cd5\u3002\u4ee5 Ubuntu \u4e3a\u4f8b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Python 3.7 \u6216 3.8\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bf9\u4e8e Python 3.7\uff1a<br><code>sudo apt-get install python3.7<\/code><\/li>\n\n\n\n<li>\u5bf9\u4e8e Python 3.8\uff1a<br><code>sudo apt-get install python3.8<\/code><\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u9700\u8981\u8f93\u5165\u7ba1\u7406\u5458\u5bc6\u7801\u8fdb\u884c\u786e\u8ba4\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165 <code>python --version<\/code> \u6765\u68c0\u67e5\u5b89\u88c5\u7684 Python \u7248\u672c\u662f\u5426\u6b63\u786e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u662f\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4e0b\u8f7d Python \u7684\u65b9\u6cd5\uff1a \u4e00\u3001Windows \u7cfb\u7edf \u4e8c\u3001macOS \u7cfb\u7edf \u4e09\u3001Linux \u7cfb\u7edf \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165 python &#8211;version \u6765\u68c0\u67e5\u5b89\u88c5\u7684 Python \u7248\u672c\u662f\u5426\u6b63\u786e\u3002<\/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-362","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/362","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=362"}],"version-history":[{"count":0,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/362\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}