{"id":221427,"date":"2020-12-01T06:15:24","date_gmt":"2020-11-30T22:15:24","guid":{"rendered":"http:\/\/4563.org\/?p=221427"},"modified":"2020-12-01T06:15:24","modified_gmt":"2020-11-30T22:15:24","slug":"pyenv-%e7%bc%96%e8%af%91%e5%a4%b1%e8%b4%a5%ef%bc%8c%e6%9c%89%e6%b2%a1%e6%9c%89%e5%a4%a7%e4%bd%ac%e7%9f%a5%e9%81%93%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=221427","title":{"rendered":"Pyenv \u7f16\u8bd1\u5931\u8d25\uff0c\u6709\u6ca1\u6709\u5927\u4f6c\u77e5\u9053\u600e\u4e48\u89e3\u51b3\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Pyenv \u7f16\u8bd1\u5931\u8d25\uff0c\u6709\u6ca1\u6709\u5927\u4f6c\u77e5\u9053\u600e\u4e48\u89e3\u51b3\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GTD <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>Pyenv \u7528<\/p>\n<pre><code>brew install pyenv <\/code><\/pre>\n<p>\u5b89\u88c5\u597d\u540e<\/p>\n<p>\u7136\u540e<\/p>\n<pre><code>pyenv install 3.9.0 <\/code><\/pre>\n<p>\u62a5\u9519\u5982\u56fe\uff1a <img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/12\/20201209_5fd08893c5fc3.jpg\" alt=\"Pyenv \u7f16\u8bd1\u5931\u8d25\uff0c\u6709\u6ca1\u6709\u5927\u4f6c\u77e5\u9053\u600e\u4e48\u89e3\u51b3\uff1f\" \/><\/p>\n<p>\u5c1d\u8bd5 head \u7248\u672c\uff0c\u4f9d\u7136\u62a5\u9519<\/p>\n<p>\u4ee5\u524d\u7528 catalina \u6ca1\u8fd9\u95ee\u9898\uff0c\u5347\u7ea7 big sur \u540e\u4e00\u76f4\u7f16\u8bd1\u5931\u8d25\uff0c\u5c1d\u8bd5 3.7.6<\/p>\n<pre><code>$ pyenv install 3.7.6 python-build: use [email&#160;protected] from homebrew python-build: use readline from homebrew Downloading Python-3.7.6.tar.xz... -&gt; https:\/\/www.python.org\/ftp\/python\/3.7.6\/Python-3.7.6.tar.xz Installing Python-3.7.6... python-build: use readline from homebrew python-build: use zlib from xcode sdk  BUILD FAILED (OS X 11.0 using python-build 20180424)  Inspect or clean up the working tree at \/var\/folders\/gj\/x6v5vwdx1v7741fdfcxwmr100000gn\/T\/python-build.20200830033458.15319 Results logged to \/var\/folders\/gj\/x6v5vwdx1v7741fdfcxwmr100000gn\/T\/python-build.20200830033458.15319.log  Last 10 log lines:     struct sf_hdtr sf;            ^ .\/Modules\/posixmodule.c:8401:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]         ret = sendfile(in, out, offset, &amp;sbytes, &amp;sf, flags);               ^ clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/MacOSX.platform\/Developer\/SDKs\/MacOSX.sdk\/usr\/include   -I\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/MacOSX.platform\/Developer\/SDKs\/MacOSX.sdk\/usr\/include   -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration   -I. -I.\/Include -I\/usr\/local\/opt\/readline\/include -I\/usr\/local\/opt\/readline\/include -I\/Users\/koji\/.pyenv\/versions\/3.7.6\/include  -I\/usr\/local\/opt\/readline\/include -I\/usr\/local\/opt\/readline\/include -I\/Users\/koji\/.pyenv\/versions\/3.7.6\/include    -c .\/Modules\/pwdmodule.c -o Modules\/pwdmodule.o 2 errors generated. make: *** [Modules\/posixmodule.o] Error 1 make: *** Waiting for unfinished jobs.... 1 warning generated. <\/code><\/pre>\n<p>\u5c1d\u8bd5\u91cd\u65b0\u5b89\u88c5 zlib<\/p>\n<pre><code>$ brew install zlib $ export LDFLAGS=\"-L\/usr\/local\/opt\/zlib\/lib\"  $ export CPPFLAGS=\"-I\/usr\/local\/opt\/zlib\/include <\/code><\/pre>\n<p>\u4f9d\u7136\u62a5\u9519\u3002<\/p>\n<p>\u5c1d\u8bd5\u76f4\u63a5 brew \u5b89\u88c5 Python 3.9\uff0c\u6210\u529f\u3002\u8bf4\u660e\u7f16\u8bd1\u5de5\u5177\u6ca1\u95ee\u9898\uff0c\u662f pyenv \u7684\u95ee\u9898\uff0c\u76ee\u524d\u6709\u5927\u4f6c\u77e5\u9053\u600e\u4e48\u89e3\u51b3\u5417\uff1f pyenv \u5bf9\u6211\u6765\u8bf4\u86ee\u91cd\u8981\u7684<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Pyenv \u7f16\u8bd1\u5931\u8d25\uff0c\u6709\u6ca1\u6709\u5927\u4f6c\u77e5&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\/221427"}],"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=221427"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/221427\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221427"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}