WARNING: The Python bz2 extension was not compiled. Hunk #1 succeeded at 495 (offset -15 lines). Hunk #1 succeeded at 3375 (offset -51 lines). 添加环境变量 export LDFLAGS="-L/usr/local/opt/zlib/lib"ĬFLAGS="-I$(brew -prefix openssl)/include -I$(brew -prefix bzip2)/include -I$(brew -prefix readline)/include -I$(xcrun -show-sdk-path)/usr/include" LDFLAGS="-L$(brew -prefix openssl)/lib -L$(brew -prefix readline)/lib -L$(brew -prefix zlib)/lib -L$(brew -prefix bzip2)/lib" pyenv install -patch 3.6.8 < <(curl -sSL \?full_index\=1) Zipimport.ZipImportError: can't decompress data zlib not available Modules/errnomodule.c -o Modules/errnomodule.o I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/tina/.pyenv/versions/3.6.8/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/tina/.pyenv/versions/3.6.8/include -c.
Modules/posixmodule.c:8805:18: note: enclose 'pwritev' in a _builtin_available check to silence this warningĬlang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/atform/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. Ssize_t pwritev(int, const struct iovec *, int, off_t) _DARWIN_NOCANCEL(pwritev) _API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) Results logged to /var/folders/m6/z1s97vbs7xd4wzf6qcnm5xw80000gn/T/
The solution to this issue is to run the following script (copied from Install mand) after brew install python3: installcertifi.py sample script to install or update a set of default Root Certificates for the ssl module. Inspect or clean up the working tree at /var/folders/m6/z1s97vbs7xd4wzf6qcnm5xw80000gn/T/python-build.20201204110013.67925 It seems that, for some reason, Brew has not run the Install mand that comes in the Python3 bundle for Mac.