{"id":153915,"date":"2020-09-11T03:07:49","date_gmt":"2020-09-10T19:07:49","guid":{"rendered":"http:\/\/4563.org\/?p=153915"},"modified":"2020-09-11T03:07:49","modified_gmt":"2020-09-10T19:07:49","slug":"mac-%e4%b8%8a%e7%9a%84-python3-%e7%89%88%e6%9c%ac%e7%aa%81%e7%84%b6%e8%87%aa%e5%8a%a8%e5%8d%87%e7%ba%a7%e4%ba%86%ef%bc%8c%e4%bb%a5%e5%89%8d%e5%88%9b%e5%bb%ba%e7%9a%84-virtuenv-%e4%b9%9f%e6%97%a0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=153915","title":{"rendered":"mac \u4e0a\u7684 python3 \u7248\u672c\u7a81\u7136\u81ea\u52a8\u5347\u7ea7\u4e86\uff0c\u4ee5\u524d\u521b\u5efa\u7684 virtuenv \u4e5f\u65e0\u6cd5\u4f7f\u7528\u4e86\uff0c\u662f\u600e\u4e48\u56de\u4e8b"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  mac \u4e0a\u7684 python3 \u7248\u672c\u7a81\u7136\u81ea\u52a8\u5347\u7ea7\u4e86\uff0c\u4ee5\u524d\u521b\u5efa\u7684 virtuenv \u4e5f\u65e0\u6cd5\u4f7f\u7528\u4e86\uff0c\u662f\u600e\u4e48\u56de\u4e8b               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211 mac \u4e0a\u767b\u5f55\u7684\u7528\u6237\uff0c\u4ee5\u524d python3 \u7684\u7248\u672c\u4e00\u76f4\u662f 3.7.3\uff0c \u6267\u884c sudo -i \u5207\u6362\u5230 root \u6743\u9650\u65f6\uff0cpython3 \u7684\u7248\u672c\u662f 3.8.3\uff0c\u53ef\u662f\u4eca\u5929\u53d1\u73b0\uff0c\u6211\u7684\u767b\u5f55\u7684\u7528\u6237\uff0cpython3 \u7684\u7248\u672c\u53d8\u6210\u4e86 3.8.3\uff0c\u4e4b\u524d\u521b\u5efa\u7684 virtuenv \u8fdb\u53bb\u4e4b\u540e\uff0c\u6240\u6709\u5305\u90fd\u63d0\u793a\u4e0d\u5b58\u5728\u4e86\uff0c\u8fde pip \u4e5f\u662f comand not found \u4e86\uff0c\u4f46 bin \u76ee\u5f55\u4e0b\u770b\uff0c\u53ef\u6267\u884c\u6587\u4ef6\u90fd\u5728\u7684\uff0c\u4e0d\u77e5\u9053\u662f\u54ea\u91cc\u641e\u574f\u73af\u5883\u53d8\u91cf\u4e86\u5417\uff1f\u770b\u6587\u4ef6\u7684\u6240\u6709\u8005\u5747\u5c5e\u4e8e\u6211\u767b\u5f55\u7684\u7528\u6237\uff0c\u611f\u89c9\u6ca1\u6709\u95ee\u9898\u554a\uff0c\u53ef\u518d\u5b8c\u5168\u6ca1\u6709\u89e3\u51b3\u529e\u6cd5\u7684\u601d\u8def\u4e86\uff0c\u8bf7\u6559\u4e00\u4e0b\u5404\u4f4d\uff0c\u6709\u9047\u5230\u8fc7\u8fd9\u79cd\u95ee\u9898\u5417\uff0c\u600e\u4e48\u89e3\u51b3\u554a      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>21<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3230174\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iConnect <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5370\u8c61\u91cc virtualenv2.0 \u4e4b\u540e\u7684\u5347\u7ea7 py \u7248\u672c\u673a\u5236\uff0c\u624d\u548c\u5185\u7f6e\u7684 venv \u4e00\u81f4\uff0c\u4e3b\u53bb\u67e5\u770b\u4e0b\u7248\u672c\u95ee\u9898\u3002\u5177\u4f53\u7248\u672c\u7ec6\u8282\u8bb0\u5f97\u4e0d\u662f\u5f88\u6e05\u695a\uff0c\u770b\u5230\u6587\u6863\u91cc\u63d0\u8fc7\u8fd9\u4e48\u4e00\u8bf4                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230175\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : a719114136 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u4e0d\u662f\u4f60 mac \u7cfb\u7edf\u5347\u7ea7\u4e86\uff0c\u5927\u7248\u672c\u5347\u7ea7\u7684\u8bdd\u53ef\u80fd\u5bfc\u81f4\u539f\u6765\u7684 python \u73af\u5883\u4e0d\u80fd\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230176\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : littlewing <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u4f7f\u7528 homebrew \u81ea\u5df1\u5b89\u88c5 py \u73af\u5883\uff0c\u4e0d\u7528\u7cfb\u7edf\u81ea\u5e26\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230177\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : TimePPT <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pyenv \u89e3\u5343\u6101                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230178\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @iConnect \u8001\u54e5\uff0c\u4e0d\u592a\u660e\u767d\u662f\u5565\u60c5\u51b5\u554a\uff0c\u6211 venv \u662f\u57fa\u4e8e 3.7.3 \u7248\u672c\u7684\uff0c\u73b0\u5728\u9ed8\u8ba4\u7684\u53d8\u6210\u4e86 3.8.3 \u4e86<\/p>\n<p>@a719114136 \u6211\u53bb\uff0c\u611f\u89c9\u8fd8\u771f\u662f\u8fd9\u4e2a\u539f\u56e0\u5bfc\u81f4\u4e86 python3 \u5347\u7ea7<\/p>\n<p>@littlewing \u597d\u50cf\u8fd8\u771f\u7684\u81ea\u5df1\u7ba1\u7406<br \/>@TimePPT \u56de\u5934\u6211\u8bd5\u8bd5\uff0c\u591a\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230179\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Dvel <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7cfb\u7edf\u73b0\u5728\u81ea\u5e26 python2 \u548c python3\uff0c\u800c\u4e14\u53ef\u80fd\u968f\u7740\u5347\u7ea7\u7cfb\u7edf\u800c\u6539\u53d8\u7248\u672c\u3002<br \/>\u5982\u679c\u4f60\u53ea\u7528\u4e00\u4e2a\u56fa\u5b9a\u7248\u672c\uff0c\u7528 homebrew \u81ea\u5df1\u88c5\u4e00\u4e2a\u3002<br \/>\u5982\u679c\u4f60\u4f7f\u7528\u591a\u4e2a\u7248\u672c\uff0c\u7528 pyenv \u53ef\u4ee5\u7ba1\u7406\u591a\u4e2a\u7248\u672c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230180\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @iConnect @a719114136 @littlewing @TimePPT @Dvel \u4ee5\u524d\u7528\u7684 windows10, \u4ece\u6765\u6ca1\u6709\u9047\u5230\u8fc7\u81ea\u52a8\u5347\u7ea7 python \u7248\u672c\u7684\u95ee\u9898\uff0c\u6700\u8fd1\u5207\u5230 mac \u4e0a\uff0c\u9996\u6b21\u53d1\u73b0\uff0c\u6709\u70b9\u60ca\u8bb6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230181\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lln133208 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f00\u53d1\u73af\u5883\u7684 Python \u6700\u597d\u4f7f\u7528 pyenv \u6765\u7ba1\u7406\uff0c\u4e0d\u8981\u4f9d\u8d56\u7cfb\u7edf\u81ea\u5e26\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230182\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : willww64 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             virtualenv \u662f\u7528 virtualenv \u547d\u4ee4\u8fd8\u662f python3 -m venv \u5efa\u7684\uff1f\u5982\u679c\u662f\u540e\u8005\u7684\u8bdd\uff0cpython3 -m venv &#8211;upgrade venv \u8bd5\u4e00\u4e0b\u770b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230183\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : breaker911 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97\u7cfb\u7edf\u7684\u95ee\u9898\u5c0f\u4e00\u4e9b\u5427 \u82f9\u679c\u5347 macos \u7684\u5404\u79cd runtime \u7248\u672c\u4e0a\u8c8c\u4f3c\u6ca1\u90a3\u4e48\u79ef\u6781<br \/>brew \u88c5\u4e2a 3.8 \u8fd8\u5f97 [email&#160;protected] \u6211\u89c9\u5f97\u82f9\u679c\u8fd9\u6b21\u6ca1\u90a3\u4e48\u6fc0\u8fdb\u5427<br \/>\u662f\u4e0d\u662f\u88c5\u4e86\u4ec0\u4e48\u4f9d\u8d56 python \u7684\u8f6f\u4ef6 \u6216\u8005\u5e93 \u6216\u8005 pycharm\/VSC \u63d2\u4ef6\u4e4b\u7c7b\u7684\u81ea\u52a8\u628a 3.7 \u5347\u5230 3.8 \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230184\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cocoabeans <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pyenv + poetry                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230185\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lln133208 \u8fd9\u56de\u5c31\u957f\u8bb0\u6027\u4e86<\/p>\n<p>@willww64 virtualenv \u662f\u7528 pip \u5b89\u88c5\u7684\uff0c\u6240\u4ee5\u4f60\u8bf4\u7684\u8fd9\u4e24\u79cd\uff0c\u90fd\u662f\u4e00\u4e2a\u6027\u8d28\u7684\u5427\uff1f<\/p>\n<p>@breaker911 \u8fd9\u51e0\u5929\u6ca1\u6709\u5347\u7ea7\u8fc7\u5176\u4ed6\u7684\uff0c\u5c31 macOS \u81ea\u52a8\u5347\u7ea7\u4e86<\/p>\n<p>@cocoabeans \u597d\u7684\uff0c\u8001\u54e5                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230186\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : breaker911 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @css3 \u770b\u4e86\u773c \u597d\u50cf\u9ed8\u8ba4\u7684\u771f\u7ed9\u5347\u5230 3.85 \u4e86&#8230;\u53ea\u4e0d\u8fc7\u6211\u7528 brew \u88c5\u7684 3.7 \u548c 3.8 \u90fd\u8fd8\u5728 \u6240\u4ee5\u9ed8\u8ba4\u8fd8\u662f 3.7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230187\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : a719114136 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Python \u662f\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\u7684\uff0cvirtualenv \u53ea\u662f\u628a\u7f16\u8bd1\u597d\u7684 Python \u590d\u5236\u4e00\u4efd\u3002<br \/>\u8001\u7cfb\u7edf\u7f16\u8bd1\u7684 Python \u4e0d\u80fd\u5728\u65b0\u7cfb\u7edf\u7528\u5f88\u6b63\u5e38\u3002\u6240\u4ee5 mac \u4e00\u822c\u4e0d\u8981\u5347\u7ea7\uff0c\u5426\u5219\u5f88\u591a\u4e1c\u897f\u90fd\u5f97\u91cd\u65b0\u5b89\u88c5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230188\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @a719114136 \u8fd9\u4f1a\u957f\u8bb0\u6027\u4e86\uff0c\u4e5f\u7ed9\u6211\u5751\u54ed\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230189\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : linvaux <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd8\u662f conda \u723d\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230190\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : IgniteWhite <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             homebrew \u52a0 pyenv \u6b63\u89e3\u3002\u53e6\u5916 arm \u7248\u51fa\u6765\u540e\uff0cpyenv \u91cc\u7684 conda \u4e0d\u4e00\u5b9a\u80fd\u7528\uff0c\u53ef\u4ee5\u8bd5\u8bd5 miniforge                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230191\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : HiddenNPC <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u4f7f\u7528 PYENV \u3002\u5347\u7ea7\u6ca1\u51fa\u8fc7\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230192\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : renmu123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u65f6\u5019\u987a\u52bf\u628a\u73af\u5883\u8f6c\u6210 pyenv \uff0b poetry\uff0c\u9999\u5c31\u5b8c\u4e8b\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230193\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : willww64 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @css3 python3.3 \u4e4b\u540e\u81ea\u5e26 venv \u6a21\u5757\uff0c\u5b8c\u5168\u4e0d\u7528\u53e6\u5916\u5b89\u88c5 virtualenv \u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230194\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @willww64 \u597d\u7684\uff0c\u6211\u4e86\u89e3\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>mac \u4e0a\u7684 python3 \u7248\u672c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/153915"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153915"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/153915\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153915"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}