{"id":203,"date":"2019-12-04T11:51:47","date_gmt":"2019-12-04T03:51:47","guid":{"rendered":"http:\/\/blog.adeying.com\/?p=203"},"modified":"2019-12-04T12:55:22","modified_gmt":"2019-12-04T04:55:22","slug":"%e3%80%90mac%e3%80%91mac%e4%b8%8a%e5%88%87%e6%8d%a2%e7%b3%bb%e7%bb%9f%e9%bb%98%e8%ae%a4%e7%9a%84python%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/adeqing.com\/index.php\/2019\/12\/04\/default\/203\/","title":{"rendered":"\u3010Mac\u3011Mac\u4e0a\u5207\u6362\u7cfb\u7edf\u9ed8\u8ba4\u7684python\u7248\u672c"},"content":{"rendered":"<h3>1.\u7ec8\u7aef\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4<\/h3>\n<div class=\"cnblogs_code\">\n<pre data-spm-anchor-id=\"a2c4e.11153940.0.i0.bb5f166abXeHJJ\">vi ~\/.bash_profile<\/pre>\n<\/div>\n<h3 id=\"4\">2.\u67e5\u770bPython \u4f4d\u7f6e<\/h3>\n<div class=\"cnblogs_code\">\n<pre data-spm-anchor-id=\"a2c4e.11153940.0.i2.bb5f166abXeHJJ\">~ which python\r\n\r\n\/usr\/bin\/python<\/pre>\n<\/div>\n<h3>3.\u6253\u5f00\u8be5\u6587\u4ef6\u4e4b\u540e\uff0c\u5728\u4e0b\u9762\u6dfb\u52a0\u5982\u4e0b\u547d\u4ee4\u884c<\/h3>\n<div class=\"cnblogs_code\">\n<pre data-spm-anchor-id=\"a2c4e.11153940.0.i3.bb5f166abXeHJJ\">alias python2='\/usr\/bin\/python' \/\/ python2 \u7684\u5730\u5740\r\nalias python3='\/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin\/python3' \/\/ python3 \u7684\u5730\u5740<\/pre>\n<\/div>\n<h3 id=\"6\">4.\u4fdd\u5b58\u540e\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\u4f7f\u4fee\u6539\u751f\u6548<\/h3>\n<div class=\"cnblogs_code\">\n<pre data-spm-anchor-id=\"a2c4e.11153940.0.i5.bb5f166abXeHJJ\">source ~\/.bash_profile<\/pre>\n<\/div>\n<h3 id=\"7\">5.\u7248\u672c<\/h3>\n<div class=\"cnblogs_code\">\n<pre data-spm-anchor-id=\"a2c4e.11153940.0.i6.bb5f166abXeHJJ\">python --version\r\nPython 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)\r\n\r\n\r\n\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>source ~\/.bash_profile\u6587\u4ef6\u5931\u6548<\/p>\n<p>\u89e3\u51b3\u5982\u4e0b\uff1a<\/p>\n<p>\u4f7f\u7528iTerm \u5b89\u88c5\u4e86oh-my-zsh\u4e4b\u540e\uff0c\u5c31\u4e0d\u518d\u4f1a\u6bcf\u6b21\u5f00iTerm\u6216\u8005\u7ec8\u7aef\u7684\u65f6\u5019\uff0c\u6267\u884c\u9ed8\u8ba4\u6587\u4ef6\u00a0~\/.bash_profile<\/p>\n<p>\u800c\u662f\u53bb\u6267\u884c .zshrc\u3002<\/p>\n<p>\u6240\u4ee5\u8981\u5230\u00a0.zshrc\u6587\u4ef6\u4e2d\u52a0\u4e0asource ~\/.bash_profile\u3002<\/p>\n<p>1\uff09\u8fdb\u5165\u5230\u7528\u6237\u76ee\u5f55\u00a0 \/Users\/\u7528\u6237\u540d\u00a0 \u4e0b<\/p>\n<p>2\uff09 vim .zshrc<\/p>\n<p>3\uff09\u5728.zshrc\u6700\u540e\u52a0\u5165source ~\/.bash_profile<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u7ec8\u7aef\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4 vi ~\/.bash_profile 2.\u67e5\u770bPython \u4f4d\u7f6e ~ which pyt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/203"}],"collection":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":5,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/203\/revisions\/208"}],"wp:attachment":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}