{"id":6704,"date":"2013-05-28T07:25:09","date_gmt":"2013-05-27T22:25:09","guid":{"rendered":"http:\/\/www.ekesete.net\/log\/?p=6704"},"modified":"2013-05-28T16:46:29","modified_gmt":"2013-05-28T07:46:29","slug":"python%e3%81%a8virtualenv%e7%92%b0%e5%a2%83%e3%81%ae%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/www.ekesete.net\/log\/?p=6704","title":{"rendered":"python virtualenv\u306b\u3088\u308b\u4eee\u60f3\u74b0\u5883\u306e\u4f5c\u6210"},"content":{"rendered":"<p>virtualenv\u3092\u4f7f\u3063\u305fpython\u306e\u4eee\u60f3\u74b0\u5883\u69cb\u7bc9\u4f5c\u6210\u3068\u5207\u308a\u66ff\u3048\u306b\u3064\u3044\u3066\u3002<\/p>\n<p>kindle\u306e\u4e2d\u8eab\u3092\u3088\u304f\u89e6\u3063\u3066\u3044\u305f\u9803\u306b\u306f\u3001\u307b\u307c\u3059\u3079\u3066\u6d77\u5916\u306e\u60c5\u5831\u3060\u3063\u305f\u3053\u3068\u3082\u3042\u3063\u3066python\u3067\u66f8\u304b\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3057\u3070\u3057\u3070\u898b\u304b\u3051\u307e\u3057\u305f\u3002\u3042\u307e\u308a\u308f\u304b\u3089\u306a\u3044\u307e\u307e\u3044\u304f\u3064\u304b\u6539\u5909\u3057\u306a\u304c\u3089\u4f7f\u3063\u3066\u3044\u305f\u306e\u3092\u601d\u3044\u51fa\u3057\u307e\u3059\u3002<br \/>\n\u6700\u8fd1\u307e\u305fpython\u3092\u30b5\u30fc\u30d0\u30fc\u7528\u306b\u4f7f\u304a\u3046\u3068\u601d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u74b0\u5883\u3092\u4f5c\u308b\u3068\u3053\u308d\u3067\u60c5\u5831\u3092\u6c42\u3081\u3066web\u3092\u3055\u307e\u3088\u3044\u306a\u304c\u3089\u69cb\u7bc9\u3057\u3066\u5927\u5909\u3060\u3063\u305f\u306e\u3067\u81ea\u5206\u306e\u305f\u3081\u306b\u5099\u5fd8\u9332\u3068\u3057\u3066\u66f8\u3044\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u3059\u3050\u5fd8\u308c\u308b\u3067\u3057\u3087\u3046\u3057\u2026<\/p>\n<p>\u4eca\u56de\u6df7\u4e71\u3057\u305f\u554f\u984c\u3068\u3057\u3066python\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306beasy_install\u3068pip\u304c\u3042\u308a\u3001\u8aac\u660e\u3057\u3066\u3044\u308b\u30b5\u30a4\u30c8\u306b\u3088\u3063\u3066\u4f7f\u3063\u3066\u3044\u308b\u7269\u304c\u9055\u3046\u3068\u3044\u3046\u3053\u3068\u3068virtualenv\u306b\u3064\u3044\u3066\u3082virtualenvwrapper\u3092\u4f7f\u3046\u304b\u4f7f\u308f\u306a\u3044\u304b\u3067\u3082\u5c11\u3057\u9055\u3044\u304c\u3042\u308b\u3053\u3068\u3067\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u964d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306fports\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067FreeBSD\u7528\u306e\u5185\u5bb9\u3067\u3059\u304c\u3001\u5165\u308c\u305f\u5f8c\u306f\u540c\u3058\u306a\u306e\u3067\u4eee\u60f3\u74b0\u5883\u306e\u69cb\u7bc9\u90e8\u5206\u304b\u3089\u306fLinux\u7b49\u3067\u3082\u540c\u7b49\u306e\u624b\u9806\u306b\u306a\u308b\u306f\u305a\u3002<br \/>\n\u3000<\/p>\n<h2>\u6e96\u5099<\/h2>\n<p>python\u672c\u4f53\u3068\u5468\u8fba\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092OS\u306e\u57fa\u672c\u74b0\u5883\u306b\u3059\u3079\u3066\u3092\u5165\u308c\u3066\u3057\u307e\u3063\u3066\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u3046\u5834\u5408\u306b\u306f\u4eee\u60f3\u74b0\u5883\u3092\u4f7f\u3046\u3068\u3044\u3046\u306e\u304c\u3088\u304f\u884c\u308f\u308c\u308b\u3088\u3046\u306a\u306e\u3067\u3053\u3053\u3067\u3082\u305d\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u3053\u308c\u306e\u304a\u304b\u3052\u3067\u74b0\u5883\u3092\u5207\u308a\u66ff\u3048\u308b\u3060\u3051\u3067\u7c21\u5358\u306b2\u7cfb\u30683\u7cfb\u3092\u540c\u3058\u30de\u30b7\u30f3\u4e0a\u3067\u52d5\u304b\u305b\u308b\u306e\u3067\u3084\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u826f\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.ekesete.net\/log\/?p=6680\">\u524d\u56deOS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066ports\u306e\u66f4\u65b0\u3092\u884c\u3063\u305f\u3068\u3053\u308d<\/a>\u304b\u3089\u3002<br \/>\n\u305b\u3063\u304b\u304fports\u304c\u3042\u308b\u306e\u3067py-virtualenv\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4f9d\u5b58\u95a2\u4fc2\u3067python(5\/27\u6642\u70b9\u3067\u306f2.7.5)\u3082\u5165\u308a\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#cd \/usr\/ports\/devel\/py-virtualenv<br \/>\n#make install clean<\/div><\/div>\n<p>\u540c\u6642\u306bsphinx\u306a\u3069\u7121\u304f\u3066\u3082\u3088\u3055\u305d\u3046\u306a\u7269\u307e\u3067\u5165\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u6c17\u306b\u306a\u308b\u5834\u5408\u306b\u306fpy-virtualenv\u3092\u4f7f\u308f\u305a\u306bpy-distutils-extra\u3092\u5165\u308c\u3066easy_install\u3092\u4f7f\u3063\u3066virtualenv\u3092\u5165\u308c\u305f\u65b9\u304c\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4ed6\u306b\u306fports\/devel\/py-pip\u3082\u3042\u308b\u306e\u3067\u3053\u308c\u3092\u5165\u308c\u3066pip\u3067virtualenv\u3092\u5165\u308c\u308b\u306e\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fpython3.3\u3092\u4f7f\u3044\u305f\u3044\u306e\u3067\u3053\u3061\u3089\u3082ports\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#cd \/usr\/ports\/lang\/python33<br \/>\n#make install clean<\/div><\/div>\n<p>5\/27\u6642\u70b9\u3067\u306f3.3.2\u3067\u3057\u305f\u3002<br \/>\n\u4e21\u65b9\u5165\u308c\u3066\u3082python\u30b3\u30de\u30f3\u30c9\u306f\/usr\/local\/bin\/python2\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u306b\u306a\u308a\u30013\u7cfb\u3092\u4f7f\u3046\u5834\u5408\u306b\u306fpython3\u3068\u3059\u308c\u3070\u4f7f\u3048\u307e\u3059\u3002<br \/>\n\u3000<\/p>\n<h2>\u4eee\u60f3\u74b0\u5883\u306e\u4f5c\u6210<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bpython3.3\u3092\u4f7f\u3046testenv\u3068\u3044\u3046\u540d\u524d\u306e\u74b0\u5883(\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$virtualenv --python=\/usr\/local\/bin\/python3.3 testenv<\/div><\/div>\n<p>\u74b0\u5883\u3092\u6709\u52b9\u5316\u3059\u308b\u306b\u306f\u3001bash\u306e\u5834\u5408<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$source testenv\/bin\/activate<\/div><\/div>\n<p>tcsh\u306a\u3069csh\u7cfb\u306e\u5834\u5408\u306f\u3053\u3061\u3089<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">%source testenv\/bin\/activate.csh<\/div><\/div>\n<p>\u6709\u52b9\u306b\u306a\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u524d\u306b\u74b0\u5883\u306e\u540d\u524d\u304c\u3064\u304f\u3088\u3046\u306b\u306a\u308a\u3001<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">[testenv] $<\/div><\/div>\n<p>\u3053\u306e\u72b6\u614b\u3067\u3042\u308c\u3070\u5909\u66f4\u3057\u305f\u74b0\u5883\u306b\u3042\u308bpython\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u74b0\u5883\u3092\u629c\u3051\u308b\u306b\u306f<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$deactivate<\/div><\/div>\n<p>\u9593\u9055\u3063\u3066exit\u306b\u3059\u308b\u3068\u30b7\u30a7\u30eb\u81ea\u4f53\u3092\u629c\u3051\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>python2.7.5(OS\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d0\u30fc\u30b8\u30e7\u30f3)\u306e\u74b0\u5883\u3067\u4f5c\u308a\u305f\u3044\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u306a\u3044\u304b\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u74b0\u5883\u304c\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$virtualenv testenv<\/div><\/div>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$virtualenv --python=\/usr\/local\/bin\/python2.7 testenv<\/div><\/div>\n<p>\u3068\u308a\u3042\u3048\u305a\u4eca\u56de\u306f\u3053\u3053\u307e\u3067\u3002<br \/>\n\u6b21\u3067Django\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<br \/>\n\u3000<\/p>\n<p>#\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u9055\u3046python\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u304c\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u4ee5\u4e0b\u306f\u30e1\u30e2\u3002<\/p>\n<h4>(\u30e1\u30e2) virtualenvwrapper\u3092\u4f7f\u3046\u5834\u5408<\/h4>\n<p>ports\u306bpy-virtualenvwrapper\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3042\u307e\u308a\u306b\u3082\u3044\u3089\u306a\u3044\u7269\u304c\u5165\u308a\u3059\u304e\u308b\u306e\u3067pip\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u65b9\u304c\u826f\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001virtualenvwrapper\u306fbash\u7528\u306a\u306e\u3067bash\u3082\u5165\u308c\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#cd \/usr\/ports\/devel\/py-pip<br \/>\n#make install clean<br \/>\n#pip install virtualenvwrapper<br \/>\n#cd \/usr\/ports\/shells\/bash<br \/>\n#make install clean<\/div><\/div>\n<p>\u6a19\u6e96\u306e\u4eee\u60f3\u74b0\u5883\u7f6e\u304d\u5834\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u306b.virtualenvs\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u305d\u306e\u4e0b\u306b\u7f6e\u304f\u306e\u3067\u3042\u308c\u3070\u3001<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">export WORKON_HOME=~\/.virtualenvs<\/div><\/div>\n<p>\u6bce\u5ea6\u66f8\u304f\u306e\u3082\u9762\u5012\u306a\u306e\u3067.bashrc\u306b\u3082\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u305d\u306e\u5f8c\u3001bash\u3092\u8d77\u52d5\u3057\u3066<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$source \/usr\/lobal\/bin\/virtualenvwrapper.sh<br \/>\n$makevirtualenv testenv<\/div><\/div>\n<p>\u3053\u308c\u3067testenv\u304c\u4f5c\u6210\u3055\u308c\u3066\u3001\u305d\u306e\u74b0\u5883\u7528\u306eshell\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u74b0\u5883\u3092\u629c\u3051\u308b\u306b\u306f<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$deactivate<\/div><\/div>\n<p>\u4e0a\u306b\u3082\u66f8\u304d\u307e\u3057\u305f\u304cvirtualenvwrapper\u3092\u4f7f\u3063\u305f\u5834\u5408\u306b\u5225\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u306f\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u306e\u3068\u3001\u73fe\u6642\u70b9\u3067\u306f\u305d\u3053\u307e\u3067\u983b\u7e41\u306b\u74b0\u5883\u3092\u884c\u304d\u6765\u3059\u308b\u3064\u3082\u308a\u3082\u306a\u3044\u306e\u3067\u3053\u3061\u3089\u306f\u4f7f\u3044\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>virtualenv\u3092\u4f7f\u3063\u305fpython\u306e\u4eee\u60f3\u74b0\u5883\u69cb\u7bc9\u4f5c\u6210\u3068\u5207\u308a\u66ff\u3048\u306b\u3064\u3044\u3066\u3002 kindle\u306e\u4e2d\u8eab\u3092\u3088\u304f\u89e6\u3063\u3066\u3044\u305f\u9803\u306b\u306f\u3001\u307b\u307c\u3059\u3079\u3066\u6d77\u5916\u306e\u60c5\u5831\u3060\u3063\u305f\u3053\u3068\u3082\u3042\u3063\u3066python\u3067\u66f8\u304b\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3057\u3070\u3057\u3070\u898b\u304b\u3051\u307e\u3057\u305f\u3002\u3042\u307e\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.ekesete.net\/log\/?p=6704\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,7,27],"tags":[],"class_list":["post-6704","post","type-post","status-publish","format-standard","hentry","category-python","category-7","category-27"],"_links":{"self":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/6704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6704"}],"version-history":[{"count":39,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/6704\/revisions"}],"predecessor-version":[{"id":6752,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/6704\/revisions\/6752"}],"wp:attachment":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}