0

I tried to install python 3.7.6 via pyenv pyenv install 3.7.6and 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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
nissy
  • 1
  • 1
  • Does this answer your question? [Problems installing python 3.6 with pyenv on Mac OS Big Sur](https://stackoverflow.com/questions/66482346/problems-installing-python-3-6-with-pyenv-on-mac-os-big-sur) – Ivaylo Toskov Oct 08 '21 at 12:55
  • I hit a similar issue, and a complete uninstall and reinstall of Homebrew and its formulae worked for me: https://stackoverflow.com/a/76847742/2214933 – Steve Piercy Aug 06 '23 at 20:55

0 Answers0