{"id":4888,"date":"2020-03-13T18:41:31","date_gmt":"2020-03-13T10:41:31","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=4888"},"modified":"2020-03-13T18:41:31","modified_gmt":"2020-03-13T10:41:31","slug":"2020%e6%9c%80%e6%96%b0mac%e7%b3%bb%e7%bb%9fpython-2-7%e5%8d%87%e7%ba%a7%e5%88%b0python-3-7%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=4888","title":{"rendered":"2020\u6700\u65b0Mac\u7cfb\u7edfPython 2.7\u5347\u7ea7\u5230Python 3.7\u6559\u7a0b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4f17\u6240\u5468\u77e5\uff0cPython 2.7 \u8fd9\u4e2a\u7248\u672c\uff0c\u5b98\u65b9\u65e9\u524d\u5df2\u7ecf\u5ba3\u5e03\u5c06\u5728 2020 \u4e0d\u5728\u8fdb\u884c\u7ef4\u62a4\u4e86\u3002\u76ee\u524d 2020 \u5e74\u5df2\u7ecf\u8fc7\u4e86\u597d\u51e0\u4e2a\u6708\u4e86\uff0c\u8fd8\u6709\u4e0d\u5c11\u4eba\u5728\u4f7f\u7528\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u662f\uff0c\u73b0\u5728\u5f88\u591a\u9879\u76ee\u5df2\u7ecf\u662f\u57fa\u4e8e Python 3.X \u4e86\uff0c\u6240\u4ee5\u5728\u67d0\u4e9b\u65f6\u5019\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u4f9d\u8d56\u5e93\u7684\u4e0d\u517c\u5bb9\u95ee\u9898\u3002\u90a3\u4e48\u8be5\u600e\u4e48\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u5462\uff1f\u90a3\u5c31\u662f\u5347\u7ea7\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u4e8e\u6b64\uff0c\u672c\u6587\u5199\u4e00\u4e2a\u7b80\u5355\u6559\u7a0b\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u4ece\u5b98\u65b9\u4e0b\u8f7d\u4e00\u4e2a\u65b0\u5b89\u88c5\u5305\u3002https:\/\/www.python.org\/downloads\/<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u5bf9\u4e0b\u8f7d\u597d\u7684 pkg \u6587\u4ef6\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0cpython 3.X \u7684\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\u5982\u4e0b\uff1a\/Library\/Frameworks\/Python.framework\/Versions\/3.X\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u540e\u4fee\u6539 profile \u6587\u4ef6\u3002\u5728 terminal \u7ec8\u7aef\u91cc\u8fd0\u884c open  ~\/.bash_profile\uff0c\u6253\u5f00 ~\/.bash_profile\uff0c\u76f4\u63a5\u4fee\u6539\u6587\u4ef6\u5373\u53ef\u3002\u4ee5 3.7 \u4e3a\u4f8b\uff0c\u4e3e\u4f8b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias python=\"\/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6216\u8005\u8fdb\u884c\u7c7b\u4f3c\u5982\u4e0b\u7684\u4fee\u6539\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.bash_profile\nexport\u00a0PATH=$PATH:\/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin:\nalias\u00a0python=\"\/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin\/python3.7\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u91cd\u542f\u4e00\u4e0b Terminal \u7ec8\u7aef\uff0c\u4f7f\u4fee\u6539\u540e\u7684\u6587\u4ef6\u751f\u6548\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u9700\u8981\u7248\u672c\u5207\u6362\uff0c\u5219\u76f4\u63a5\u4fee\u6539 profile \u6587\u4ef6\u5373\u53ef\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9a8c\u8bc1\u7248\u672c\u5f88\u7b80\u5355\uff0c\u76f4\u63a5 python -v \u5373\u53ef\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=4888\">2020\u6700\u65b0Mac\u7cfb\u7edfPython 2.7\u5347\u7ea7\u5230Python 3.7\u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u4f17\u6240\u5468\u77e5\uff0cPython 2.7 \u8fd9\u4e2a\u7248\u672c\uff0c\u5b98\u65b9\u65e9\u524d\u5df2\u7ecf\u5ba3\u5e03\u5c06\u5728 2020 \u4e0d\u5728\u8fdb\u884c\u7ef4\u62a4\u4e86\u3002\u76ee\u524d 2020 \u5e74\u5df2 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1210,1229,1213,1214,108],"class_list":["post-4888","post","type-post","status-publish","format-standard","hentry","category-yyzt","tag-python","tag-pythonic","tag-108"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4888"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4888\/revisions"}],"predecessor-version":[{"id":4889,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4888\/revisions\/4889"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}