{"id":1064,"date":"2016-12-14T14:33:00","date_gmt":"2016-12-14T14:33:00","guid":{"rendered":"https:\/\/rawbytes.org\/?p=1064"},"modified":"2025-11-24T02:59:35","modified_gmt":"2025-11-24T02:59:35","slug":"pyenv%e3%81%a8pyenv-virtualenv%e3%81%a7%e4%bb%bb%e6%84%8f%e3%81%aepython%e7%92%b0%e5%a2%83%e3%81%ab%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88%e3%82%8b%ef%bc%88homebrew%e4%bd%bf%e7%94%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/rawbytes.org\/?p=1064","title":{"rendered":"pyenv\u3068pyenv-virtualenv\u3067\u4efb\u610f\u306epython\u74b0\u5883\u306b\u5207\u308a\u66ff\u3048\u308b\uff08homebrew\u4f7f\u7528\uff09"},"content":{"rendered":"<p>pyenv\u3092\u4f7f\u3063\u3066\u4efb\u610f\u306ePython\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u3055\u3089\u306b\u3001pyenv-virtualenv\uff08pyenv\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u3044\u3046\u3053\u3068\u3089\u3057\u3044\uff09\u3067\u3001\u540c\u4e00\u306ePython\u30d0\u30fc\u30b8\u30e7\u30f3\u5316\u3067\u3082\u4efb\u610f\u306epython\u5b9f\u884c\u74b0\u5883\u304c\u7ba1\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u3053\u308c\u306fpip\u3068\u304b\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408\u306b\u4fbf\u5229\u3060\u308d\u3046\u3002<\/p>\n<p>homebrew\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n<p><\/p>\n<ol>\n<li>pyenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>$ brew install pyenv<\/li>\n<li>pyenv-virtualenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>$ brew install pyenv-virtualenv<\/li>\n<\/ol>\n<div>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u81ea\u4f53\u306f\u4e0a\u8a18\u3067\u7d42\u4e86\u3002\u7d9a\u3044\u3066PATH\u74b0\u5883\u5909\u6570\u306a\u3069\u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u304c\u3001\u3053\u308c\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\uff08zsh\u306a\u3089.zshrc\uff09\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u8a18\u3059\u308c\u3070\u826f\u3044<\/div>\n<div>\n<blockquote class=\"tr_bq\"><p>\nif which pyenv &gt; \/dev\/null; then eval &#8220;$(pyenv init -)&#8221;; fi<br \/>if which pyenv-virtualenv &gt; \/dev\/null; then eval &#8220;$(pyenv virtualenv-init -)&#8221;; fi<\/p><\/blockquote>\n<p>\u3053\u308c\u3067PATH\u306a\u3069\u306e\u74b0\u5883\u5909\u6570\u3092\u66f8\u304d\u63db\u3048\u3066\u3001\u5b9f\u969b\u306bpython\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067pyenv\u306e\u8a2d\u5b9a\u304c\u6709\u52b9\u306b\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3001\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u3001\u73fe\u5728\u306e\u30b7\u30a7\u30eb\u5185\u306e\u3044\u305a\u308c\u304b\u3067\u4efb\u610f\u306epython\u74b0\u5883\u304c\u5229\u7528\u3067\u304d\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001python\u3067\u8907\u6570\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7ba1\u7406\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001\u5fc5\u8981\u306a\u6700\u5c0f\u9650\u3060\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u74b0\u5883\u304c\u69cb\u7bc9\u3067\u304d\u3066\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>pyenv\u3092\u4f7f\u3063\u3066\u4efb\u610f\u306ePython\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002 \u3055\u3089\u306b\u3001pyenv-virtualenv\uff08pyenv\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u3044\u3046\u3053\u3068\u3089\u3057\u3044\uff09\u3067\u3001\u540c\u4e00\u306ePython\u30d0\u30fc\u30b8\u30e7\u30f3\u5316\u3067\u3082\u4efb\u610f\u306epython\u5b9f\u884c\u74b0\u5883\u304c\u7ba1\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u3053\u308c\u306fpip\u3068\u304b\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408\u306b\u4fbf\u5229\u3060\u308d\u3046\u3002 homebrew\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3002 pyenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb$ brew install pyenv pyenv-virtualenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb$ brew install pyenv-virtualenv \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u81ea\u4f53\u306f\u4e0a\u8a18\u3067\u7d42\u4e86\u3002\u7d9a\u3044\u3066PATH\u74b0\u5883\u5909\u6570\u306a\u3069\u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u304c\u3001\u3053\u308c\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\uff08zsh\u306a\u3089.zshrc\uff09\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u8a18\u3059\u308c\u3070\u826f\u3044 if which pyenv &gt; \/dev\/null; then eval &#8220;$(pyenv init -)&#8221;; fiif which pyenv-virtualenv &gt; \/dev\/null; then eval &#8220;$(pyenv virtualenv-init -)&#8221;; fi \u3053\u308c\u3067PATH\u306a\u3069\u306e\u74b0\u5883\u5909\u6570\u3092\u66f8\u304d\u63db\u3048\u3066\u3001\u5b9f\u969b\u306bpython\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067pyenv\u306e\u8a2d\u5b9a\u304c\u6709\u52b9\u306b\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002 \u5177\u4f53\u7684\u306b\u306f\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3001\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u3001\u73fe\u5728\u306e\u30b7\u30a7\u30eb\u5185\u306e\u3044\u305a\u308c\u304b\u3067\u4efb\u610f\u306epython\u74b0\u5883\u304c\u5229\u7528\u3067\u304d\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001python\u3067\u8907\u6570\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7ba1\u7406\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001\u5fc5\u8981\u306a\u6700\u5c0f\u9650\u3060\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u74b0\u5883\u304c\u69cb\u7bc9\u3067\u304d\u3066\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-1064","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1064"}],"version-history":[{"count":1,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1064\/revisions"}],"predecessor-version":[{"id":1065,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1064\/revisions\/1065"}],"wp:attachment":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}