版权声明:Copyright © https://cloud.tencent.com/developer/article/1476322
系统 10.14.3
报错 Install failed, “zlib not available” on macOS Mojave
GitHub 上的解决方案
Well, if you use the brew, zlib not available means that pyenv compilers can't find zlib header files. The brew has told you in brew info zlib that
For compilers to find zlib you may need to set:
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
so just execute
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
and then
pyenv install 3.7.1
There is another warning WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib? also like this, execute
export LDFLAGS="-L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include"
then install your version. Worked for me.
macOS Mojave 10.14.1
pyenv 1.2.8
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有