macでpyenv install 3.7.2ができず、pythonがインストールできません。
コマンドを実行すると、下記のようになります。
$ pyenv install 3.7.2 python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.7.2.tar.xz... -> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz Installing Python-3.7.2... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 11.2.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/pz/hg_bp79n23d_krzs54xzq0zh0000gn/T/python-build.20210217162909.4333 Results logged to /var/folders/pz/hg_bp79n23d_krzs54xzq0zh0000gn/T/python-build.20210217162909.4333.log Last 10 log lines: clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/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/yamayaryo/.pyenv/versions/3.7.2/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/yamayaryo/.pyenv/versions/3.7.2/include -DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.c clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/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/yamayaryo/.pyenv/versions/3.7.2/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/yamayaryo/.pyenv/versions/3.7.2/include -DPy_BUILD_CORE_BUILTIN -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o ./Modules/posixmodule.c:8409:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ret = sendfile(in, out, offset, &sbytes, &sf, flags); ^ clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/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/yamayaryo/.pyenv/versions/3.7.2/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/yamayaryo/.pyenv/versions/3.7.2/include -DPy_BUILD_CORE_BUILTIN -c ./Modules/errnomodule.c -o Modules/errnomodule.o 1 error generated. make: *** [Modules/posixmodule.o] Error 1 make: *** Waiting for unfinished jobs.... 1 warning generated.
いろいろググって下記の対応をしてみましたがだめでした。
(rmでcommandLineのディレクトリを削除して実行済み)
xcode-select --install
brew update brew upgrade brew install pyenv zlib bzip2 readline eval "$(pyenv init -)"
バージョン情報です。
mac:Big Sur 11.2.1
pyenv:1.2.22
どうすればよいでしょうか。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー