{"id":595,"date":"2016-11-10T09:21:57","date_gmt":"2016-11-10T00:21:57","guid":{"rendered":"https:\/\/www.dogrow.net\/python\/?p=595"},"modified":"2019-10-19T11:36:00","modified_gmt":"2019-10-19T02:36:00","slug":"blog76","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/python\/blog76\/","title":{"rendered":"(76) ValueServer\u306bPython2.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u3053\u306e\u30d6\u30ed\u30b0\u306f\u6709\u6599\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3067\u3042\u308bValueServer\u4e0a\u306b\u8a2d\u7f6e\u3057\u3066\u3044\u308b\u3002<br \/>\nValueServer\u3067\u306f\u3001\u6a19\u6e96\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c <span class=myr>2.6.6<\/span> \u3068\u3061\u3087\u3063\u3068\u53e4\u3044\u3002(2016\u5e7411\u6708\u73fe\u5728)<\/p>\n<p>\u3053\u306e\u305f\u3081\u3001Python2.7\u4ee5\u964d\u3067\u8ffd\u52a0\u3055\u308c\u305f\u65b0\u6a5f\u80fd\u306e\u4e00\u90e8\u304c\u4f7f\u7528\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u304a\u501f\u308a\u3057\u3066\u3044\u308b\u30ed\u30fc\u30ab\u30eb\u306a\u74b0\u5883\u306b <span class=mydp>Python2.7<\/span> \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\n<span class=\"my_fc_crimsonB\">\u5f53\u7136 root\u6a29\u9650\u306f\u4e0e\u3048\u3089\u308c\u3066\u3044\u306a\u3044\u306e\u3067&#8230;<\/span><\/p>\n<h1 class=\"my_h\">1. \u6700\u65b0\u306ePython\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u5165\u624b<\/h1>\n<p>2016\u5e7411\u6708\u6642\u70b9\u306e\u6700\u65b0\u7248\u306f <span class=mydp>Python2.7.11<\/span><\/p>\n<pre>\r\n$ cd\r\n$ pwd\r\n\/virtual\/xxxxxxxx\r\n$ echo $HOME\r\n\/virtual\/xxxxxxxx\r\n$ wget https:\/\/www.python.org\/ftp\/python\/2.7.11\/Python-2.7.11.tgz\r\n<\/pre>\n<h1 class=\"my_h\">2. \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b9f\u884c<\/h1>\n<p>\u3053\u3053\u3067\u306f\u3001<span class=\"my_fc_blueB\">$HOME\/usr\/local<\/span> \u914d\u4e0b\u306bPython2.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<pre>\r\n$ tar zxvf Python-2.7.11.tgz\r\n$ cd Python-2.7.11\r\n$ mkdir -p $HOME\/usr\/local\/\r\n$ CC=gcc CXX=g++ .\/configure --prefix=$HOME\/usr\/local\/\r\n$ make\r\n$ make install\r\n<\/pre>\n<h1 class=\"my_h\">3. \u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/h1>\n<p>\u81ea\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3068\u304d\u306b\u306f Python2.7\u304c\u81ea\u52d5\u7684\u306b\u9078\u629e\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre>\r\n$ cd\r\n$ vi .bash_profile\r\n<\/pre>\n<p>\u4ee5\u4e0b\u3092\u66f8\u304d\u8fbc\u3080\u3002<br \/>\n<span class=\"my_fc_deeppinkB\">PYTHONHOME<\/span> : \u6a19\u6e96 Python \u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5834\u6240\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f \/usr\/local\uff09<br \/>\n<span class=\"my_fc_deeppinkB\">PYTHONPATH<\/span> : \u30e2\u30b8\u30e5\u30fc\u30eb\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u691c\u7d22\u30d1\u30b9\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f9d\u5b58\uff09<br \/>\n<a href=\"http:\/\/docs.python.jp\/2.7\/using\/cmdline.html#envvar-PYTHONHOME\" target=_blank rel=\"noopener noreferrer\">\u203b\u8a73\u7d30\u306f\u3053\u3061\u3089\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/a><\/p>\n<pre>\r\nexport PATH=$HOME\/usr\/local\/bin:$PATH\r\nexport PYTHONHOME=$HOME\/usr\/local\r\nexport PYTHONPATH=$HOME\/usr\/local\/lib\/python2.7\/site-packages\r\n<\/pre>\n<p>\u66f8\u304d\u8fbc\u3093\u3060\u5185\u5bb9\u3092\u73feshell\u306b\u53cd\u6620\u3055\u305b\u308b\u3002<\/p>\n<pre>\r\n$ source .bash_profile\r\n<\/pre>\n<h1 class=\"my_h\">4. Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d<\/h1>\n<pre>\r\n$ python --version\r\nPython 2.7.11\r\n<\/pre>\n<p>\u3053\u308c\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\uff01<\/p>\n<p>\u5f8c\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5099\u3048\u3066 <span class=\"my_fc_deeppinkB\">setuptools<\/span> \u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre>\r\n$ wget https:\/\/bootstrap.pypa.io\/ez_setup.py\r\n$ python ez_setup.py\r\n<\/pre>\n<p>\u3053\u308c\u3067 <span class=\"my_fc_deeppinkB\">easy_install<\/span> \u304c\u4f7f\u3048\u308b\u3002<\/p>\n<h1 class=\"my_h\">5. \u3064\u3044\u3067\u306b Python3\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>Python3.5.2\uff082016\u5e7411\u6708\u6642\u70b9\u306e\u6700\u65b0\u7248\uff09\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre>\r\n$ cd\r\n$ pwd\r\n\/virtual\/xxxxxxxx\r\n$ echo $HOME\r\n\/virtual\/xxxxxxxx\r\n$ wget https:\/\/www.python.org\/ftp\/python\/3.5.2\/Python-3.5.2.tgz\r\n\r\n$C=gcc CXX=g++ .\/configure --prefix=$HOME\/usr\/local\/\r\n\r\n$make\r\n$make install\r\n\r\n$which python3\r\n~\/usr\/local\/bin\/python3\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30d6\u30ed\u30b0\u306f\u6709\u6599\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3067\u3042\u308bValueServer\u4e0a\u306b\u8a2d\u7f6e\u3057\u3066\u3044\u308b\u3002 ValueServer\u3067\u306f\u3001\u6a19\u6e96\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 2.6.6 \u3068\u3061\u3087\u3063\u3068\u53e4\u3044\u3002(2016\u5e7411\u6708\u73fe\u5728) \u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/python\/blog76\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-27"],"views":2915,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":32,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":2705,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/595\/revisions\/2705"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}