{"id":161427,"date":"2020-09-12T02:02:11","date_gmt":"2020-09-11T18:02:11","guid":{"rendered":"http:\/\/4563.org\/?p=161427"},"modified":"2020-09-12T02:02:11","modified_gmt":"2020-09-11T18:02:11","slug":"%e5%a4%a7%e5%ae%b6%e6%9c%89%e7%94%a8-pyenv-win-%e7%9a%84%e5%90%97%ef%bc%9f%e7%94%a8%e8%bf%99%e4%b8%aa%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0-pyenv-virtualenv-%e7%9a%84%e5%8a%9f%e8%83%bd%e5%91%a2%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=161427","title":{"rendered":"\u5927\u5bb6\u6709\u7528 pyenv-win \u7684\u5417\uff1f\u7528\u8fd9\u4e2a\u5982\u4f55\u5b9e\u73b0 pyenv-virtualenv \u7684\u529f\u80fd\u5462\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5927\u5bb6\u6709\u7528 pyenv-win \u7684\u5417\uff1f\u7528\u8fd9\u4e2a\u5982\u4f55\u5b9e\u73b0 pyenv-virtualenv \u7684\u529f\u80fd\u5462\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : onice <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6709\u65f6\u5019\uff0c\u6211\u9700\u8981\u7528\u5230\u591a\u7248\u672c\u7684 python \u73af\u5883\u3002\u901a\u8fc7\u8c37\u6b4c\uff0c\u53d1\u73b0 pyenv \u6bd4\u8f83\u9760\u8c31\uff0c\u4f46\u8fd9\u4e2a\u53ea\u6709 linux \u7248\u672c\u7684\u3002<\/p>\n<p>\u540e\u6765\u901a\u8fc7 github\uff0c\u4e86\u89e3\u5230\u6709\u4eba\u628a\u8fd9\u4e2a\u4ece linux \u79fb\u690d\u5230\u4e86 windows \u3002<\/p>\n<p>\u4f46\u662f\u79fb\u690d\u7684\u8fd9\u4e2a\u7248\u672c\uff0c\u4e0d\u80fd\u4f7f\u7528 pyenv-virtualenv\uff0c\u8fd9\u6837\u7684\u8bdd\uff0c\u6211\u8981\u600e\u4e48\u5b9e\u73b0 virtualenv \u7684\u529f\u80fd\u5462\uff1f<\/p>\n<p>\u6709\u7528\u8fc7\u8fd9\u4e2a\u7684\u5417\uff1f Windows \u5e73\u53f0\u4e0b\uff0c\u591a\u7248\u672c\u7684 python \u89e3\u91ca\u5668\u7ba1\u7406\u548c\u865a\u62df pip \u7a7a\u95f4\uff0c\u5927\u5bb6\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\u5565\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3485570\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : silkriver <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63a8\u8350\u7528 conda\uff0c\u53c2\u770b\u8fd9\u4e00\u7bc7 https:\/\/www.jianshu.com\/p\/29939b94d9cc                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3485571\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : RRRoger <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             conda + 1 \uff08 miniconda                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3485572\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wersonliu9527 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u7528 python3 \u81ea\u5e26\u7684 python3 -m venv venv_name                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3485573\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maocat <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Windows \u4e0b python \u73af\u5883\u53ef\u4ee5\u76f4\u63a5\u53ea\u7528 virtualenv \u6765\u7ba1\u7406<\/p>\n<p>\u5148\u901a\u8fc7\u5168\u5c40 pip \u5b89\u88c5 virtualenv<\/p>\n<p>pip install virtualenv<\/p>\n<p>\u6bd4\u5982\u6211\u5728 c: \u4e0b\u5b89\u88c5\u4e86\u4e09\u4e2a\u7248\u672c\u7684 python<br \/> c:<br \/> python27<br \/> python36<br \/> python37<\/p>\n<p>\u76f4\u63a5\u4f7f\u7528 <\/p>\n<p>virtualenv -p c:python27python.exe venv # venv \u8868\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6784\u5efa\u865a\u62df\u73af\u5883\u76ee\u5f55 venv python \u7248\u672c 2.7<\/p>\n<p>virtualenv -p c:python37python.exe venv # venv \u8868\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6784\u5efa\u865a\u62df\u73af\u5883\u76ee\u5f55 venv python \u7248\u672c 3.7                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3485574\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Python \u5b98\u65b9\u63d0\u4f9b\u7684 Windows \u5b89\u88c5\u5305\u5c31\u80fd\u591a\u7248\u672c\u5171\u5b58\u7684\uff0c\u6ca1\u5fc5\u8981\u518d\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u7ba1\u7406\u5427\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u6709\u7528 pyenv-win \u7684\u5417&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\/161427"}],"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=161427"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/161427\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161427"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}