I tried to install python 3.7.6 via pyenv pyenv install 3.7.6
and got this error
BUILD FAILED (OS X 11.4 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/gv/8n7w8jk952b55d_4kyld38qr0000gn/T/python-build.20210911102704.65527
Results logged to /var/folders/gv/8n7w8jk952b55d_4kyld38qr0000gn/T/python-build.20210911102704.65527.log
Last 10 log lines:
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.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/nishimorihajimeichirou/.pyenv/versions/3.7.6/include -I/usr/local/opt/zlib/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/nishimorihajimeichirou/.pyenv/versions/3.7.6/include -I/usr/local/opt/zlib/include -DPy_BUILD_CORE_BUILTIN -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
.....
./Modules/posixmodule.c:8436:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(in, out, offset, &sbytes, &sf, flags);
^
1 error generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
I did brew install zlib
but still got error
mac OS: Big Sur 11.4
which python3
/Users/[my name]/.pyenv/shims/python