{"id":1441,"date":"2018-10-29T22:05:59","date_gmt":"2018-10-29T13:05:59","guid":{"rendered":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1441"},"modified":"2018-10-29T22:05:59","modified_gmt":"2018-10-29T13:05:59","slug":"pyenv%e3%81%a7centos7%e3%81%abpython3-7-0%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1441","title":{"rendered":"pyenv\u3067CentOS7\u306bpython3.7.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<h2>\u74b0\u5883<\/h2>\n<p>CentOS Linux release 7.5.1804 (Core)<br \/>\npyenv 1.2.7<\/p>\n<h2>\u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>pyenv\u306e<a href=\"https:\/\/github.com\/pyenv\/pyenv\/wiki\">\u516c\u5f0f\u306ewiki<\/a>\u306b\u3042\u308b\u63a8\u5968\u3055\u308c\u308b\u4f9d\u5b58\u95a2\u4fc2\u3092\u307e\u3068\u3081\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre>yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel<\/pre>\n<h2>python\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b9f\u65bd<\/h2>\n<pre>[yoshitake@localhost ~]$ pyenv install 3.7.0\r\n(\u7565)\r\n[yoshitake@localhost ~]$ pyenv versions\r\n* system (set by \/home\/yoshitake\/.pyenv\/version)\r\n3.7.0<\/pre>\n<p>\u5207\u308a\u66ff\u3048<\/p>\n<pre>[yoshitake@localhost ~]$ pyenv global 3.7.0\r\n[yoshitake@localhost ~]$ pyenv versions \r\n  system\r\n* 3.7.0 (set by \/home\/yoshitake\/.pyenv\/version)\r\n<\/pre>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5931\u6557\u306e\u30ed\u30b0<\/h2>\n<p>zlib\u672c\u4f53\u306f\u3082\u3068\u304b\u3089\u5165\u3063\u3066\u3044\u305f\u3051\u3069\u3001\u8aad\u3081\u306a\u3044\u3068\u8a00\u308f\u308c\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5931\u6557\u3002<br \/>\nzlib-devel\u304c\u5165\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u304b\u3089\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u306a\u3063\u305f\uff1f<\/p>\n<pre>[yoshitake@localhost ~]$ pyenv install 3.7.0\r\nDownloading Python-3.7.0.tar.xz...\r\n-&gt; https:\/\/www.python.org\/ftp\/python\/3.7.0\/Python-3.7.0.tar.xz\r\nInstalling Python-3.7.0...\r\n\r\nBUILD FAILED (CentOS 7.5.1804 using python-build 20180424)\r\n\r\nInspect or clean up the working tree at \/tmp\/python-build.20181029194007.1745\r\nResults logged to \/tmp\/python-build.20181029194007.1745.log\r\n\r\nLast 10 log lines:\r\n  File \"\/tmp\/python-build.20181029194007.1745\/Python-3.7.0\/Lib\/ensurepip\/__main__.py\", line 5, in \r\n    sys.exit(ensurepip._main())\r\n  File \"\/tmp\/python-build.20181029194007.1745\/Python-3.7.0\/Lib\/ensurepip\/__init__.py\", line 204, in _main\r\n    default_pip=args.default_pip,\r\n  File \"\/tmp\/python-build.20181029194007.1745\/Python-3.7.0\/Lib\/ensurepip\/__init__.py\", line 117, in _bootstrap\r\n    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)\r\n  File \"\/tmp\/python-build.20181029194007.1745\/Python-3.7.0\/Lib\/ensurepip\/__init__.py\", line 27, in _run_pip\r\n    import pip._internal\r\nzipimport.ZipImportError: can't decompress data; zlib not available\r\n<\/pre>\n<p>zlib\u672c\u4f53\u306f\u3082\u3068\u304b\u3089\u5165\u3063\u3066\u3044\u305f<\/p>\n<pre>[yoshitake@localhost ~]$ sudo yum install zlib -y\r\n[sudo] yoshitake \u306e\u30d1\u30b9\u30ef\u30fc\u30c9:\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, langpacks\r\nLoading mirror speeds from cached hostfile\r\n * base: mirrors.cat.net\r\n * extras: mirrors.cat.net\r\n * updates: mirrors.cat.net\r\n\u30d1\u30c3\u30b1\u30fc\u30b8 zlib-1.2.7-17.el7.x86_64 \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u304b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\r\n\u4f55\u3082\u3057\u307e\u305b\u3093<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u74b0\u5883 CentOS Linux release 7.5.1804 (Core) pyenv 1.2.7 \u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb pyenv\u306e\u516c\u5f0f\u306ewiki\u306b\u3042\u308b\u63a8\u5968\u3055\u308c\u308b\u4f9d\u5b58\u95a2\u4fc2\u3092\u307e\u3068\u3081\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 yum in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[],"class_list":["post-1441","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1441"}],"version-history":[{"count":1,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1441\/revisions"}],"predecessor-version":[{"id":1442,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1441\/revisions\/1442"}],"wp:attachment":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}