macOS 10.15.6(Catalina)にて、pyenv で
shell
1pyenv install 3.6.11
と入れると
python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.6.11.tar.xz... -> https://www.python.org/ftp/python/3.6.11/Python-3.6.11.tar.xz Installing Python-3.6.11... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 10.15.6 using python-build 20180424) Inspect or clean up the working tree at /var/folders/66/ggg5xl991933f9ctjtv78ync0000gn/T/python-build.20200914100109.18238 Results logged to /var/folders/66/ggg5xl991933f9ctjtv78ync0000gn/T/python-build.20200914100109.18238.log Last 10 log lines: ^ 216 warnings and 10 errors generated. make: *** [Programs/python.o] Error 1 make: *** Waiting for unfinished jobs.... 216 warnings and 10 errors generated. 216 warnings and 10 errors generated. 216 warnings and 10 errors generated. make: *** [Parser/grammar1.o] Error 1 make: *** [Parser/listnode.o] Error 1 make: *** [Parser/acceler.o] Error 1
とエラーになってしまいます。
log を見ると最後の方で以下のような記載がありますが、どう対処していいのか分からない状態です。
In file included from Parser/listnode.c:4: In file included from ./Include/pgenheaders.h:10: In file included from In file included from Parser/acceler.c:13: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:36: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:72: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:202: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h:31:25: error: cannot combine with previous 'type-name' declaration specifier typedef __darwin_gid_t gid_t; ^ ./pyconfig.h:1513:15: note: expanded from macro 'gid_t' #define gid_t int ^ In file included from Parser/acceler.c:13: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:36: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:72: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:202: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h:31:1: warning: typedef requires a name [-Wmissing-declarations] typedef __darwin_gid_t gid_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/Python.h:36: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:72: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:202: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h:31:25: error: cannot combine with previous 'type-name' declaration specifier typedef __darwin_gid_t gid_t; ^ ./pyconfig.h:1513:15: note: expanded from macro 'gid_t' #define gid_t int ^ In file included from Parser/listnode.c:4: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:36: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:72: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:202: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h:31:1: warning: typedef requires a name [-Wmissing-declarations] typedef __darwin_gid_t gid_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from Parser/grammar1.c:4: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:33: error: 'long type-name' is invalid typedef __darwin_clock_t clock_t; ^ ./pyconfig.h:1507:17: note: expanded from macro 'clock_t' #define clock_t long ^ In file included from Parser/grammar1.c:4: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:1: warning: typedef requires a name [-Wmissing-declarations] typedef __darwin_clock_t clock_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./Programs/python.c:3: In file included from ./Include/Python.h:89: ./Include/unicodeobject.h:68:2: error: Must define SIZEOF_WCHAR_T #error Must define SIZEOF_WCHAR_T ^ In file included from Parser/acceler.c:13: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:33: error: 'long type-name' is invalid typedef __darwin_clock_t clock_t; ^ ./pyconfig.h:1507:17: note: expanded from macro 'clock_t' #define clock_t long ^ In file included from Parser/acceler.c:13: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:1: warning: typedef requires a name [-Wmissing-declarations] typedef __darwin_clock_t clock_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from Parser/listnode.c:4: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:33: error: 'long type-name' is invalid typedef __darwin_clock_t clock_t; ^ ./pyconfig.h:1507:17: note: expanded from macro 'clock_t' #define clock_t long ^ In file included from Parser/listnode.c:4: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:53: In file included from ./Include/pyport.h:205: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:69: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:1: warning: typedef requires a name [-Wmissing-declarations] typedef __darwin_clock_t clock_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from Parser/grammar1.c:4: In file included from ./Include/Python.h:89: ./Include/unicodeobject.h:68:2: error: Must define SIZEOF_WCHAR_T #error Must define SIZEOF_WCHAR_T ^ In file included from Parser/acceler.c:13: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:89: ./Include/unicodeobject.h:68:2: error: Must define SIZEOF_WCHAR_T #error Must define SIZEOF_WCHAR_T ^ In file included from Parser/listnode.c:4: In file included from ./Include/pgenheaders.h:10: In file included from ./Include/Python.h:89: ./Include/unicodeobject.h:68:2: error: Must define SIZEOF_WCHAR_T #error Must define SIZEOF_WCHAR_T ^ 216 warnings and 10 errors generated. make: *** [Programs/python.o] Error 1 make: *** Waiting for unfinished jobs.... 216 warnings and 10 errors generated. 216 warnings and 10 errors generated. 216 warnings and 10 errors generated. make: *** [Parser/grammar1.o] Error 1 make: *** [Parser/listnode.o] Error 1 make: *** [Parser/acceler.o] Error 1
pyenv の python インストール系で記事になっているものはいくつか試しました(エラーコードが異なるので、的外れだとは思いますが)。
- openssl: インストール済み(参考: openssl@1.1ならmacOS MojaveとpyenvでPython 3.7がインストール可能)
- Command Line Tool: 再インストール(参考: pyenv install でエラーが発生する)
- zlib:インストール済み(参考: pyenvでpythonのインストールがzlibエラーで失敗した時の対応)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。